Hi all!
I'm using a B404X on a B Series Eval Board and have been unable to control the GPIO to blink an LED.
My code:
int led1 = D6;
int led2 = D7;
void setup() {
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
}
void loop() {
digitalWrite(led1, HIGH);
digitalWrite(led2, HIGH);
delay(1000);
digitalWrite(led1, LOW);
digitalWrite(led2, LOW);
delay(1000);
}
My LED wiring:
LED + to PWM2 (D6) on the Eval Board through 220 Ohm resistor
LED - to Eval Board GND
What I've tried:
Confirmed that my LED circuit is working
Plugged the LED + into D7 (which is connected to the LED on the board, and here it blinks alongside the LED on the board)
Multiple other pins on the GPIO
Unfortunately, I haven't been able to get the LED to blink on any pin, outside of D7.
Any ideas what I'm doing wrong?
Best,
west
ScruffR
October 19, 2023, 10:45pm
2
Could this be your issue?
Hi @rickkas7 -
I was meaning to reply sooner but I was out all day and just got back.
I managed to resolve the 'issue' around D6 pin, though not sure why or whether this is intended. There is jumper in one of the two banks of jumpers that seems to cause this behaviour. If I remove the jumper, D6 functions normally. If I bridge the jumper out, D6 goes (and stays) low.
[b-series-eval-labeled]
Both Eval boards I have came with all the jumpers bridged out, my mistake in thinking this would …
If you also have that jumper set, the state of the detect pin on the SD card slot might interfere with the level you are setting via digitalWrite()
.
2 Likes
Thanks for the quick reply @ScruffR
Unfortunately my board doesn't have this jumper (I have the M.2 SOM EVAL BOARD V1.1).
This also doesn't seem to be a D6 specific issues, since D5, D4 etc. also don't work.
To add another wrinkle to this, the A0, A1, etc. pins are working properly.
Is my board defective?
@ScruffR you were right. It's the jumpers. They're different on my board but upon removing them, the GPIO pins now work as intended. Thanks for the help.
I think it would be useful to call this out on the docs, which I read before I came here: B Series Evaluation Board | Reference | Particle
It's not clear from these that you HAVE to remove the jumpers to use the GPIO.
Thanks again!
1 Like
Good catch @ScruffR
@west2788 Happy yo hear your problems have been resolved. It kept me busy for a couple of days
1 Like
system
Closed
November 19, 2023, 3:33pm
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.