Go Down

Topic: Example code for the Nano Every  (Read 420 times) previous topic - next topic

Grumpy_Mike

Looking at the example code for the new Nano Every it seems like it is just the old examples and not at all specific for the new board.

The two serial ports example uses software serial where as the new Nano Every in fact has two serial ports. I would have that to be featured in such and example.

pert

The Arduino IDE doesn't have any mechanism to change the examples under the "Built-in Examples" section of the File > Examples menu. Those are always just the sketches under the examples folder of the Arduino IDE folder.

However, the Arduino IDE does display the examples of libraries bundled with a hardware core only when one of the boards of that core is selected. Quite a few 3rd party hardware core authors have used this feature to provide example sketches specific to their core by creating a dummy library with the example sketches as examples of the library. For example:
https://github.com/esp8266/Arduino/tree/master/libraries/esp8266/examples
The only possible downside is perhaps someone might get confused as to what this "esp8266" library is, but all it takes is a comment in the dummy .h file to fix that. So I don't see any reason why Arduino couldn't do the same to provide some sketches demonstrating special features of the ATmega4809 when those sketches don't require a library.

You can't control the display of examples on a per-board basis, but likely the sketches would apply to the Uno WiFi Rev2 as well as the Nano Every, so it's not a problem.

Go Up