[solved] How do I turn the LED off?

I just got my Arduboy dev kit today, and before writing any other programs, I’d like to find a way to turn the LED off and stop it from blinking. In the dark the blinking is harsh on the eyes. Writing a program that only turns pin 17 off still causes the light to blink for a split second.
I’m new and really hoping I’m missing something silly.

#include <EEPROM.h>
#include <SPI.h>
#include "Arduboy.h"
Arduboy display;
void setup() {
  display.start();
}
void loop() {
  digitalWrite(17,1);
}

Thank you @davidperrenoud, your solution is great.

2 Likes

The LED seems to be connected to the RX functionality of the Arduino. That means it will blink every time it receives data from the computer, that is why it will not blink if you connect it to a USB power supply or USB battery.

As a workaround, you can “disable” the RX LED by putting it in input mode:

void setup() {
  pinMode(17, INPUT); // Disable RX LED
}
2 Likes

As @davidperrenoud notes it’s configured in the bootloader so you have to override the setting.

Originally we intended the LED to indicate you had a good data connection but realize that it’s probably rather annoying since you’ll be using the USB cable so much.

In the kickstarter version we are using some separate LEDS for TX/RX and I’m specifying them to be low-brightness LED’s

EDIT: It’s also another candidate for being covered with electrical tape such as the “volume control” solution :wink:

1 Like

Better to use high brightness LEDs and just increase the value of the dropping resistors to make them dimmer. You’ll save power that way.

Worth trying out, gotta be careful about matching the forward voltage of course. Also trying to specify using opaque lenses so they are easier on the eye as well.

I think you meant diffused not opaque. An LED with an opaque lens would emit no light at all (although, that would be much easier on the eye). :wink:

To correct myself; rather than high brightness you really want LEDs that are specified as high efficiecy at low current. Sometimes this is the same thing.

black nail polish will do the trick , if you want to dim the light.

Use an usb battery pack and you won’t have blinking either