Electron and LED

Hey there,

this is my first Particle Electron project.
In my application, I need to drive a LED. I did use the LED and resistor from the Electron Kit.
The application and wiring is similar to “Blink an LED” example.

The Electron was connected via battery and USB and everything was working fine.
However, when connected to battery only de LED did not blink anymore - just a irregular flash after some seconds.
Battery SOC was around 80%

How can I drive an LED at the Particle Electron with its battery?

Best regards

You are running this 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);
}

And you have got the setup as shown here (make sure you go the correct resistor 330Ohm red-red-brown)
https://docs.particle.io/guide/getting-started/examples/electron/#blink-an-led

For me this setup works as expecte with battery only power too.

1 Like

Hi ScruffR

got it - thank you.

It had something to do with my LCD which i did disconnect during battery because it needs 5V.
It seems that if I2C connection could not be established (because display was removed) the Electron came to a halt.

Once I removed the LCD from the code, everything works

Thank you

1 Like