6. Upload your first program
- Download this demo program and unzip it to your Documents->Arduino folder. (My Documents->Arduino in Mac). The program is shown below. Alternately, you can copy and paste the code below in its entirety in to the Arduino IDE
- In the Arduino IDE, go to File->Open and select the O_Watch_Logo_Demo.ino file from the Arduino folder. Click ok when it asks to create a folder.
- Make sure the Tools->Boards and Tools-Port both point to TinyScreen+.
- Click the arrow icon pointing to the right on top menu bar of Arduino IDE. This is the upload button that loads the program into your O Watch. It should show ‘Uploading’ and then ‘Done uplodading’ on the status bar on below the IDE.
- If it successfully uploaded then you should see the demo running on the O Watch screen.
Congratulations on first O Watch upload!
* Hello World
* This is a simple program that blinks 'Hello World'
* This for the Arduino compatible TinyScreen+ by http://tiny-circuits.com
* This example is in the public domain.
* Published 29 Feb 2016
* by O Watch http://theowatch.com
#include <TinyScreen.h> //Include TinyScreen library
TinyScreen display = TinyScreen(TinyScreenPlus); //Set TinyScreen board type
int delaytime = 1000; //Declaring a variable to set the delay between text blink
// The setup function runs once when you power on the board
display.begin(); //Initializes TinyScreen board
display.setFlip(1); //Flips the TinyScreen rightside up for O Watch
display.on(); //Turns TinyScreen display on
display.setFont(liberationSansNarrow_12ptFontInfo); //Set the fornt type
display.fontColor(TS_8b_Blue,TS_8b_Black); //Set the font color, font background
display.setBrightness(10); //Set display brightness 0 - 15
// the loop function runs over and over again forever
display.setCursor(15,25); //set the cursor to x, y position, where to start next print/draw instruction
display.print("Hello World!"); //print command
delay(delaytime); //delay for 1000 milliseconds or one second
display.clearScreen(); //clears the screen blank
delay(delaytime); //delay again for one second