User Tools

Site Tools


my_first_sketch

My first sketch

Using the Paperduino Tiny with the Arduino IDE:

This board works differently than most Arduino compatible products. Not only is there a special version of the IDE to support it, but it also programs with a different procedure.

From the Tools menu select Board→Digispark.
From the Tools menu select Programmer→Digispark

Write some code, open your code or download our blink example.

Plug Paperduino to USB, but not insert Power switch jumper.

Hit the upload button. The bottom status box will now ask you to plug in your board.
This is the right time to insert Power switch jumper.

You'll see the upload progress and then it will immediately run your code on the Paperduino Tiny.

Board wait 5 second after the reset and then run code inside the chip. This 5 second delay is the bootloader checking to see if you are trying to program it.

This simple blink program, uses LED D5 directly on Paperduino Tiny board:

blink.ino
/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
 
  This example code is in the public domain.
 */
 
// Pin 1 has an LED connected on Paperduino Tiny.
// give it a name:
int led = 1;
 
// 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);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}
my_first_sketch.txt · Last modified: 2014/03/31 21:59 by ondra