All Firmata Examples give errors compiling, other simple sketches all compile OK

SUCCESSFUL ARDUINO “COMPILES”: I received a Uno WiFi Rev2 and my first successful sketch (to compile and run) was Jon_LSM6DS3_Arduino_Simple from, on 10/08/2020. I added the (Jon)_so that I can recall where it came from. The “successful” sketches directory now contains 30 basic sketches which are from the Arduino site and several web sites.

PROCESSING WITH FIRMATA: About 11/13/2020 I started to study Firmata sketches and attempted to compile the Arduino examples. My project is a Control/Monitoring program for a solar tracker system and it seems that using the Firmata protocol would be good. I have read some articles which discuss using Firmata and/or Processing with Firmata. I started working my way through the majority of “example Firmata” sketches but all produced error messages.

At that time, my Arduino IDE was Arduino 1.8.13 Nightly. My first attempted compile returned a message to edit the boards.h file to add my board. I found a boards.h header (2009-2016 Jeff Hoefs. Last updated April 10th, 2016) that contained information about the Uno WiFi Rev 2 and I replaced the original file which seemed to stop that error.

MY LAST ATTEMPT: After the failed attempts with the “example” Firmata sketches I made a last attempt with the sketch FirmataExpress which was last updated May 10, 2020 by Alan Yorinks. The errors are all similar and list problems with either the .h or .cpp of FirmataMarshaller. I have not altered the code on any of the examples or the FirmataExpress sketch which is discussed below.

ERRORS FROM LAST ATTEMPT WITH FirmataExpress which was last updated May 10, 2020: A few errors (which are typical) are included below.

TYPICAL ERRORS -------------------------------------------------------------------------------------
C:\Users\keith\Documents\Arduino\libraries\FirmataExpress\FirmataMarshaller.cpp:27:0:C:\Users\keith\Documents\Arduino\libraries\FirmataExpress\FirmataMarshaller.h:47:16: error: 'Stream' has not been declared void begin(Stream &s);

^~~~~~C:\Users\keith\Documents\Arduino\libraries\FirmataExpress\FirmataMarshaller.h:78:5: error: 'Stream' does not name a type; did you mean 'fread'? Stream * FirmataStream;

^~~~~~ freadC:\Users\keith\Documents\Arduino\libraries\FirmataExpress\FirmataMarshaller.cpp: In member function 'void firmata::FirmataMarshaller::reportAnalog(uint8_t, bool) const':C:\Users\keith\Documents\Arduino\libraries\FirmataExpress\FirmataMarshaller.cpp:55:9: error: 'Stream' was not declared in this scope if ( (Stream *)NULL == FirmataStream ) { return; }

^~~~~~C:\Users\keith\Documents\Arduino\libraries\FirmataExpress\FirmataMarshaller.cpp:55:9: note: suggested alternative:In file included from C:\Users\keith\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino/api/deprecated/Stream.h:23:0, from C:\Users\keith\Documents\Arduino\libraries\FirmataExpress\FirmataMarshaller.h:34, from C:\Users\keith\Documents\Arduino\libraries\FirmataExpress\FirmataMarshaller.cpp:27:c:\users\keith\appdata\local\arduino15\packages\arduino\hardware\megaavr\1.8.6\cores\arduino\api\stream.h:50:7: note: 'arduino::Stream' class Stream : public Print

^~~~~~C:\Users\keith\Documents\Arduino\libraries\FirmataExpress\FirmataMarshaller.cpp:55:17: error: expected primary-expression before ')' token if ( (Stream *)NULL == FirmataStream ) { return; } ^In file included from c:\users\keith\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5\avr\include\avr\pgmspace.h:89:0, from

The errors pointed to a problem within my Arduino settings and I uninstalled, deleted all the files that I could locate and reinstalled Arduino: 1.8.14 Hourly - (Windows 10), which is now installed. After the reinstall I still got the same errors.
Thank you for any attention KK.

posted on -- Interfacing w/ Software on the Computer
Firmata, Processing, Max/MSP, PureData, VVVV, etc.

As you found, the release version of Firmata that comes with the Arduino IDE or that you can install via Arduino Library Manager does not support the Uno WiFi Rev2.

The good news is that adding support for the Uno WiFi Rev2 to the Firmata library is in progress and you can start using the beta testing version of the library with the support for that board now. The bad news is that the installation process a little bit more complex, but not so bad. Just follow these instructions:

You can now use the Firmata library with Uno WiFi Rev2.

Optional, but if you're not using it for anything, I also recommend removing that "FirmataExpress" library, since it's possible it could interfere with the usage of the standard Firmata library. You can do that by deleting C:\Users\keith\Documents\Arduino\libraries\FirmataExpress. Please be very careful when deleting things from your computer. When in doubt, back up!

Thank You. I hope to get this done today. I am almost excited to see Firmata and Processing in action. I hope that you and yours are well. Keith Klein

You’re welcome. I’m glad if I was able to be of assistance. If you get the time, please let us know how that beta testing version of the library worked for you.


Pert, Thank you again. I followed your instructions (this morning) and the Beta StandardFirmata compiled and uploaded fine. I have Processing 3.5.4 loaded and it seems to run ok. Now I must start reading and decide how to get Processing and Firmata to work together. I have read a lot about how the good the combination works but now I will get the details.

I am going to try to send you a copy of the output from the uploading of the StandardFirmata. (Attachments)

I suspect that you may know of a document that gives more details for using Firmata for controlling this Arduino board and I would appreciate it for a reference.
Thanks again Keith Klein

memos_1.txt (8.43 KB)

error or notes_1.txt (16.4 KB)