Just tried to use my Feather nRF52840 Sense for the first time. Connected it via USB and uploaded the following code via PlatformIO, using the Adafruit Feather Bluefruit Sense board option:
Code: Select all
#include <Arduino.h>
void setup() {
pinMode(LED_BLUE, OUTPUT);
pinMode(LED_RED, OUTPUT);
pinMode(PIN_BUTTON1, INPUT_PULLUP);
}
void loop() {
bool buttonState = digitalRead(PIN_BUTTON1);
if (buttonState == HIGH)
{
digitalWrite(LED_RED, HIGH);
digitalWrite(LED_BLUE, HIGH);
}else{
digitalWrite(LED_RED, LOW);
digitalWrite(LED_BLUE, LOW);
}
}
Anyone know what could be going on here?
Thanks,
Wyatt