I have been looking at using uart to communicate with my screen but I keep getting errors with both soft-uart and uart. Both give me “error: use of undeclared identifier ‘SERIAL_PORT_HARDWARE’”, and soft-uart also gives me “fatal error: ‘SoftwareSerial.h’ file not found”.
The latter I assume is some sort of XOD setup problem, as I have Arduino 1.8.10 installed (in /opt/Arduino-1.8.10) and SoftwareSerial is present in the libraries. I can compile a sketch with Arduino ide with “#include <SoftwareSerial.h>” in it and the file is found and the sketch will compile successfully. I’ve checked the XOD folder and found in the
__packages__ folder a path to SoftwareSerial, (/home/ian/xod/
__packages__/packages/arduino/hardware/avr/1.8.2/libraries/SoftwareSerial) but XOD still can’t find it. I tried adding another directory called 1.8.10 at the same level as 1.8.2, and copied in the same folders from the 1.8.10 install of Arduino, but still get the same error. I think it must have got the 1.8.2 libraries from /home/ian/.arduino15/packages/arduino/hardware/avr/1.8.2, as that library still exists on my computer. I don’t think the latest Arduino ide uses that library any more, but I can’t say for sure. I deleted the .arduino15 folder and it didn’t affect XOD at all. It still worked and still produced the same errors.
The missing identifier I have not been able sort out. I have tried adding it in to the C++ code (with a #define), but it is used in a command and I couldn’t guess what the correct value would be.
I also tried both soft-uart and uart in the web version of XOD and they both returned the same errors.
I also had a look at some other libraries, such as gabbapeople/4d-ulcd and bradzilla84/visi-genie-extra-library, but they also use uart and/or soft-uart nodes, so I could not get them to compile either.
All advice gratefully received.