Closed JoeBerlin69 closed 4 months ago
Have you managed to resolve this? I'm having a similar issue, I'm not sure how they address?
I am sorry. No i haven't a solution. I took some original pcbs from david. They work well. A built 10 split flaps in the past. They all work well. This was my first attempt (and really expensive) with this pcb and i hope, s.o. can help me with my problems told in my second issue.
Hey, all pins are labeled on the back of the PCB:
The source code of @evilscientress' fork states:
#define ADRESSSW1 6
#define ADRESSSW2 5
#define ADRESSSW3 4
#define ADRESSSW4 3
Meaning tht only the top 4 jumpers currently control the address, in that order. The other jumpers can be used for something else or for more address bits in the future.
Sorry if this is a silly question - Do I use the jumpers like this?
Those are precisely the wrong ones. You gotta use the top ones. The bottom ones are unused for now.
Like this?
I'm on my way right now and can't verify it. Please just… try it out? The basic idea is right but i can't say/verify off the top of my head right now if it might be inverted or backwards.
I had the same issue. After some debugging I found that you have to uncomment this line. After uploading the new firmware it was working. On the ESPMaster board you just leave the address blank (no jumpers). Hope this helps!
Quite late to the party but wanted to clarify as others might stumble over it:
Checking the Unit.ino
file it states:
// Pins of I2C adress switch
#define ADRESSSW1 6
#define ADRESSSW2 5
#define ADRESSSW3 4
#define ADRESSSW4 3
The function getaddress
then translates the jumpers into the address and returns it
//returns the adress of the unit as int from 0-15
int getaddress() {
int address = !digitalRead(ADRESSSW4) + (!digitalRead(ADRESSSW3) * 2) + (!digitalRead(ADRESSSW2) * 4) + (!digitalRead(ADRESSSW1) * 8);
return address;
}
This means jumpers need to be set like this: | D6 | D5 | D4 | D3 | |
---|---|---|---|---|---|
Unit 1 (Master) | |||||
Unit 2 | x | ||||
Unit 3 | x | ||||
Unit 4 | x | x | |||
Unit 5 | x | ||||
Unit 6 | x | x | |||
Unit 7 | x | x | |||
Unit 8 | x | x | x | ||
Unit 9 | x | ||||
Unit 10 | x | x |
Or in picture. This is the setting for Units 1-4
Debugging: To see to which address the unit is currently set it is helpful to enable the serial monitor. After enabling and restarting the ATmega it will prompt to which address it is set. E.g. I2CAddress: 1
For my liking it is not obvious to start in the middle to set the jumpers. However when someone reads the code is it quite clear :)
I will most probably adapt my getaddress()
function to calculate it the other way around. One could do it via the ADRESSSW
definitions but for me ADRESSSW1
sounds like the lowest bit.
Thanks a lot for this great PCB design!
How do I use these adress jumpers? From top or bottom?