I’m working on an extension for an Arduino Uno robot. mBlock5. In the Transcode Settings tab of the block, I have added, for example, the files from the Adafruit_NeoPixel library.
The generated C code works, if I copy it from the Arduino C side window of mBlock to the Arduino IDE, and upload it from there. If I try to upload it from mBlock, compile errors.
I’ve found that if I look at the downloaded unzipped extension code, in the src/arduinosources.js file, some .cpp and .h files parse to valid JSON, and some don’t. The ones that don’t are the ones that won’t compile.
One guess is that sources that don’t transcode to valid JSON have characters that are special characters in JSON? If so, I haven’t figured it out yet. I’ll keep looking at it.
Any ideas? Anyone have a more robust ArduinoC generator?
Is there a way to include libs without making JSON out of them?
Thanks.