hreichert / node-red-contrib-johnny5

A set of node-red nodes for connecting to johnny-five IO Plugins
MIT License
5 stars 4 forks source link

How to identify a board's name running firmata? #4

Open PizzaProgram opened 3 years ago

PizzaProgram commented 3 years ago

It is possible to rename the .INO project file before uploading to an Arduino, so it can be identified.
Here is how:
http://firmata.org/wiki/Protocol#Query_Firmware_Name_and_Version

PizzaProgram commented 3 years ago

Also...

At the board-config panel under the "edit ioplugin node" tab => There could be +1 edit box under "Name" called: Force-check board name: [ ]

So if someone is filling it out, it would prevent to start giving any orders. if (name_to_check != firmata_board_name) ... error

And instead of "connected" the item sub-sting would show: ! Bad board name

Why ?

If using multiple devices attached to the same server, it is essential at least to verify:

If (for some reason) the USB ports getting mixed up, and it's "an other one" => it can cause serious problems or even injuries.

PizzaProgram commented 3 years ago

Of course the BEST solution would be to be able to:

I'm talking about a secondary (more advanced) enhancement. There would be a checkbox under the "Force-check board name:" editbox. Something like: [ x ] Auto-Search other ports too, if board name mismach.

Saving the {{names & ports}} into a global array would also prevent to do this many times. So if there are 2 or more boards attached => each one would be the "right one" ordered to the new USB port, even if mixed up.