User Tools

Site Tools


oak:tutorials:arduino

This is an old revision of the document!


Connecting and Programming Your Oak

Installation Instructions:


First Time Usage:

If you are using a new Oak that has never received its initial update you must complete this tutorial first: Connecting your Oak for the first time

Arduino IDE

The Oak on Arduino uses the Arduino IDE 1.6.5 or higher. (1.6.5r2 is strongly recommended as 1.6.6 and 1.6.7 have some bugs that can cause install issues with third party boards like the Oak)

  • Download the appropriate Arduino package at the Arduino.cc website: https://www.arduino.cc/en/Main/Software
  • Install or unzip the Arduino application.
  • In the Arduino application go to the “File” menu and select “Preferences”.

  • In the box labeled “Additional Boards Manager URLs” enter:
    http://digistump.com/package_digistump_index.json

    and click OK.

Note: If you already have additional URLs entered in that box, then click the button on the right of the box and enter this URL on a new line.

  • Go to the “Tools” menu, then to the “Board” submenu, and select “Boards Manager”. Choose “Contributed” from the drop down select.
  • Select the “Oak by Digistump” package and click the “Install” button.
  • You'll see the download progress on the bottom bar of the “Boards Manager” window, when complete it will show “Installed” next to that item on the list.
  • With the install complete, close the “Boards Manager” window and select the Oak by Digistump from the ToolsBoards menu.
[1] Unnamed Device (Device ID: d9xxxxxxxxxxxxxxxxxxxxxx)
[2] ------------------------
[3] Switch Particle Accounts
[0] Exit

Which device would you like to use? [1, 2, 3, 0] : 1

Configuration saved at /home/user/.oak/config.json
You can now upload files to this device.
Currently selected device: Unnamed Device (Device ID: d9xxxxxxxxxxxxxxxxxxxxxx)
  • If you are done, select exit. You only have to do this once or when you want to change devices.
  • The install is now complete!

For troubleshooting tips see here: http://digistump.com/wiki/oak/tutorials/troubleshooting

Note: You can force the Oak into safe mode to receive uploads even if something is failing by holding Pin 1 low during boot.

Sources

Your first upload:

If you're just getting started try the above procedure with the example you can find by going to File→Examples→Oak→Start

Here is the code it will load:

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pin as an output.
  pinMode(1, OUTPUT); //LED on Model A   
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(1, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(1, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}

This code will blink the BUILTIN LED on Pin 1.

When you click upload it will be sent to the Particle Cloud, you will then see the LED on your Oak blink rapidly as it is uploaded to the device. As soon as it has uploaded you should see the LED start to blink!

Support requests are best posted to the forum, so everyone can benefit and we can help each other through any issues - http://digistump.com/board

oak/tutorials/arduino.1465004298.txt.gz · Last modified: 2016/06/03 18:38 by digistump