Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

DefenestratorNZ
Copy link

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)

by pulling a pin low it sets the correct i2cSlaveAddress
pull pin for low for node 5-8
Fixed a logic issue with the IF statement
@scottgchin
Copy link
Owner

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
Copy link
Author

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
Copy link
Contributor

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants