User Tools

Site Tools


oak:tutorials:arduino

This is an old revision of the document!


Connecting and Programming Your Oak

**BETA WARNING**

The Oak firmware is currently an early Beta release. At this time we ask you to only install it if you are confident in your ability to recover a Bricked unit or be very careful not to Brick your unit. We suggest you only install the firmware if you have a serial programmer on hand that is 3.3V capable, so that you can recover a bricked unit (https://github.com/digistump/OakRestore). This warning is very temporary, as we continue to test and get feedback from the first group of users - we expect to have a full first release and remove this warning approx Feb 18th

Thank you all for your continued patience!


Installation Instructions:

If you previously used an earlier Beta please do a factory reset.

!! YOU MUST ENSURE ARDUINO OAK PACKAGE IS UP TO DATE AT 0.9.5 BEFORE PROCEEDING !!

SoftAP

  • Setup your Oak and allow it to download the system firmware using the SoftAP Config App:
    http://rawgit.com/digistump/OakSoftAP/master/config.html

    Please force your browser to refresh to ensure you are using the newest copy of this page.

  • Follow the wizard which is guiding you through the whole process. You need your credentials for Particle or create an account.

  • Connect your system to the Oak. The SSID is ACORN-XXXXXX where the Xs are part of the MAC address.

  • Choose your network to let the Oak connect to the internet.

  • Let your Oak perform the update.

Arduino IDE

The Oak on Arduino uses the Arduino IDE 1.6.5 or higher.

  • 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.
  • The first time you upload a sketch to the Oak you will see an error message like this “Config file not found at: /path/to/config.json - please run the oak tool from the command line with no arguments to configure.
    • Download and run the OakCLI tool from here: https://github.com/digistump/OakCLI and run it (from any directory), enter your Particle login data and select your device, then re-run the upload. You only have to do this once.
  • BE SURE TO READ the release notes here: https://github.com/digistump/OakCore/releases for important tips on how to use and not to use the early beta release.
  • 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 0 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.1456820174.txt.gz · Last modified: 2016/03/01 00:16 by digistump