User Tools

Site Tools


oak:tutorials:arduino

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
oak:tutorials:arduino [2016/01/27 23:05]
digistump
oak:tutorials:arduino [2016/06/03 18:38]
digistump
Line 1: Line 1:
- 
- 
- 
- 
- 
- 
 ======Connecting and Programming Your Oak====== ======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 fully expect to remove this warning within 1-2 days** 
  
-Thank you all for your continued patience!+====== Installation Instructions:​ ======
  
 ---- ----
  
  
-=====Software:=====+===== First Time Usage: =====
  
-The Oak on Arduino uses the Arduino IDE 1.6.5 or higher. +If you are using a new Oak that has never received its initial update you must complete this tutorial first[[oak:​tutorials:​connecting|Connecting your Oak for the first time]]
- +
-====== Installation Instructions======+
  
 +===== 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)
  
-========**YOU MUST ENSURE ARDUINO OAK PACKAGE IS UP TO DATE AT 0.9.2 BEFORE PROCEEDING**========= 
  
-  * **Setup your Oak and allow it to download the system firmware using the SoftAP Config App:** http://​rawgit.com/​digistump/​OakSoftAP/​master/​config.html +  *  Download the appropriate Arduino package at the Arduino.cc website: https://​www.arduino.cc/​en/​Main/​Software 
-  *  **Download the appropriate Arduino package at the Arduino.cc website: https://​www.arduino.cc/​en/​Main/​Software** +  *  Install or unzip the Arduino application. 
-  *  ​**Install or Unzip the Arduino application.** +  *  In the Arduino application go to the "**File**" menu and select "**Preferences**".
-  *  ​**In the Arduino application go to the "​File"​ menu and select "​Preferences"**+
 {{ :​digispark:​tutorials:​preferences.gif?​nolink |}} {{ :​digispark:​tutorials:​preferences.gif?​nolink |}}
-  *  ​**In the box labeled "​Additional Boards Manager URLs" enter:** <​code>​http://​digistump.com/​package_digistump_index.json</​code>​ +  *  In the box labeled "**Additional Boards Manager URLs**" enter: <​code>​http://​digistump.com/​package_digistump_index.json</​code>​ and click OK.
-**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.+**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.
 {{ :​digispark:​tutorials:​entry.jpg?​nolink |}} {{ :​digispark:​tutorials:​entry.jpg?​nolink |}}
  
-  *  ​**Go to the "​Tools"​ menu and then the "​Board"​ submenu ​select "​Boards Manager" ​and then from the type drop down select ​"​Contributed":​** ​ +  *  Go to the "**Tools**" menuthen to the "**Board**" submenu, and select "**Boards Manager**". Choose "​**Contributed**" from the drop down select. 
-  ​* **Select the "Digistump ​Oak and Acorn" package and click the "​Install"​ button.**+  * 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.**  +    *  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 Tools->​Boards ​menu. ** +    * With the install complete, close the "**Boards Manager**" window and select the **Oak by Digistump** from the **Tools**->**Boards** ​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 and select your device, then re-run the uploadYou only have to do this once.* +  * You now must set up your Particle Cloud login so you can upload to your device. Download ​the OakCLI tool from here:  
-  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.+     * Windows: https://github.com/digistump/​OakCLI/​releases/​download/​1.0.2/oakcli-1.0.2-win32.zip 
 +     * Mac OSX: https://​github.com/​digistump/​OakCLI/​releases/​download/​1.0.2/​oakcli-1.0.2-osx.tar.gz 
 +     Linux 32bit: https://​github.com/​digistump/​OakCLI/​releases/​download/​1.0.2/​oakcli-1.0.2-linux32.tar.gz 
 +     ​Linux 64bit: https://​github.com/​digistump/​OakCLI/releases/​download/​1.0.2/​oakcli-1.0.2-linux64.tar.gz 
 +  * Run the OakCLI (eg. ''​./​oak''​) tool you just downloaded (from any directory), enter your [[https://​www.particle.io/​|Particle]] login data and select your device.
  
-  *  **The install is now complete!** ​+<​code>​ 
 +[1] Unnamed Device (Device ID: d9xxxxxxxxxxxxxxxxxxxxxx) 
 +[2] ------------------------ 
 +[3] Switch Particle Accounts 
 +[0] Exit
  
-**NOTE:** You can force the Oak into safe mode to receive uploads even if something is failing by holding Pin 10 low during boot. +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)
 +</​code>​
  
-==== Sources ====+  * If you are done, select exit. You only have to do this once or when you want to change devices. ​
  
-**Oak Arduino Core: ** https://​github.com/​digistump/​OakCore+  ​The install is now complete!
  
-**Oak System/​Config Firmware** https://github.com/digistump/OakSystem+For troubleshooting tips see herehttp://digistump.com/wiki/​oak/​tutorials/troubleshooting
  
-**Oak Fallback Updater Firmware: ** https://​github.com/​digistump/​OakSystem+**Note:** You can force the Oak into safe mode to receive uploads even if something is failing by holding Pin 1 low during boot
  
-**Oak SoftAP Config App: ** https://​github.com/​digistump/​OakSoftAP+==== Sources ====
  
-**Oak CLI Tool: ** https://​github.com/​digistump/​OakOTA+  * **Oak Arduino Core: ** https://​github.com/​digistump/​OakCore 
 +  * **Oak System/​Config Firmware: ** https://​github.com/​digistump/​OakSystem 
 +  * **Oak Fallback Updater Firmware: ** https://​github.com/​digistump/​OakSystem 
 +  * **Oak SoftAP Config App: ** https://​github.com/​digistump/​OakSoftAP 
 +  * **Oak CLI Tool: ** https://​github.com/​digistump/​OakOTA
  
 =====Your first upload:​===== =====Your first upload:​=====
Line 79: Line 85:
 void loop() { void loop() {
   digitalWrite(1,​ HIGH); ​  // turn the LED on (HIGH is the voltage level)   digitalWrite(1,​ HIGH); ​  // turn the LED on (HIGH is the voltage level)
-  ​Particle.delay(1000); ​              // wait for a second+  delay(1000); ​              // wait for a second
   digitalWrite(1,​ LOW);    // turn the LED off by making the voltage LOW   digitalWrite(1,​ LOW);    // turn the LED off by making the voltage LOW
-  ​Particle.delay(1000); ​              // wait for a second+  delay(1000); ​              // wait for a second
 } }
 </​code>​ </​code>​
oak/tutorials/arduino.txt · Last modified: 2016/07/19 18:12 by pfeerick