scottgchin / delta5_race_timer

Multi-node video transmitter race timer for drone racing
MIT License
159 stars 62 forks source link

Change to remove the need to edit delta5node.ino for each nano #92

Open DefenestratorNZ opened 5 years ago

DefenestratorNZ commented 5 years ago

currently there is a need to manually change the address for each of the arduino units. with the code that i have added and adding a small wire to each of the nodes you can use the code unaltered on each arduino units

by pulling one of the pins(5-8) to GND the code will assign an address for each socket on the board regardless of which nano is in place as all nanos will have the same code

by Pulling pin 4 to GND the code will assign one of the 2nd set of addresses

what do you think? (first time i have ever submitted code to a project)

scottgchin commented 5 years ago

I understand the what's being done, but to ask a dumb question... why is this necessary? seems like more work on the hardware side vs. changing an address when flashing the arduinios. Seems like a neat way to handle it though.

DefenestratorNZ commented 5 years ago

considering all the soldering they are currently doing 4 extra resistors or plane wires isnt going to complicate things much more and if you need to place one of the nanos you can have a spare 1 or 2 with you to just drop into place no need to worry about what code is on the nano

if your using the 'every thing is in a socket' way of building the boards which is how i plan on building the ten im about to :)

ethomas997 commented 5 years ago

I think it'd be good if the node ino code could support either method -- specifying the node ID directly, or "auto detect." I've got a PR posted here that makes it use a NODE_NUMBER define so a node ID can be entered as a 1 to 8 value instead of an I2C address. I could see also supporting NODE_NUMBER=0 for "auto detect."

HazardCreative commented 4 years ago

RotorHazard has settled on an updated specification for the feature: https://github.com/RotorHazard/RotorHazard/wiki/Specification:-Node-hardware-addressing

Alongside simpler flashing requirements (which is helpful with an automated flashing system), this also allows groups to bring a spare component to the field in case of failure. No reflashing would be needed to replace any of the existing Arduinos.