arduino/gemma_test/gemma_test.ino
2018-11-03 20:21:33 +00:00

35 lines
1.0 KiB
C++

/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
To upload to your or Trinket:
1) Select the proper board from the Tools->Board Menu (Arduino Gemma if
teal, Adafruit Gemma if black)
2) Select the uploader from the Tools->Programmer ("Arduino Gemma" if teal,
"USBtinyISP" if black Gemma)
3) Plug in the Gemma into USB, make sure you see the green LED lit
4) For windows, make sure you install the right Gemma drivers
5) Press the button on the Gemma/Trinket - verify you see
the red LED pulse. This means it is ready to receive data
6) Click the upload button above within 10 seconds
*/
int led = 1; // blink 'digital' pin 1 - AKA the built in red LED
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}