the following into it, you can then save it as trinketblink or something similar, so you have
it handy
If you are using Linux you will have to be "root" running the Arduino program to have
access to the USB port
/*
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 Gemma or Trinket:
1) Select the proper board from the Tools->Board Menu
2) Select USBtinyISP from the Tools->Programmer
3) Plug in the Gemma/Trinket, make sure you see the green LED lit
4) For windows, install the USBtiny 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);
}
Select the Trinket 8MHz board from the To o ls->Bo ard menu
© Adafruit
Industries
https://learn.adafruit.com/introducing-trinket
Page 21 of 48
Need help?
Do you have a question about the Trinket and is the answer not in the manual?