adafruit / Adafruit_CircuitPlayground

library for Circuit Playground board
171 stars 77 forks source link

Fix redLed() #41

Closed caternuson closed 5 years ago

caternuson commented 5 years ago

Possible fix for #40

Tested with a CPC and a CPX. Following blinks red LED on D13 10 times then plays a tone for a second, and repeats.

#include <Adafruit_CircuitPlayground.h>

void setup() {
  CircuitPlayground.begin();
}

void loop() {
  for (int i=0; i<10; i++) {
    CircuitPlayground.redLED(HIGH);
    delay(200);
    CircuitPlayground.redLED(LOW);
    delay(200);
  }
  CircuitPlayground.playTone(500, 1000);  
}