Intel® IoT Platforms: Getting started using Android IDE
Overview
This guide will teach you how to connect to your Intel Edison board using the Arduino IDE on Windows, OS X, or Linux. It will walk you through the IDE setup and getting the onboard LED to blink.
Requirements
- Intel Edison Module
- Intel Edison Arduino Expansion Board
- Two micro USB cables
- You have attached the Edison to the Arduino Expansion Board
Choose your operating system:
Install Arduino and Blink LED (Windows)
Troubleshooting:
Not seeing the port in device manager or under "Tools > Serial Port" menu? Make sure you have installed all the proper drivers from here
Troubleshooting:
Getting a "No such file or directory" error message when trying to upload? Try selecting a different com port from "Tools > Serial Port".
1. In order to avoid problems while handling zip files with long paths we recommend that you use 7zip, a free archive utility that can be downloaded at: www.7zip.org.
2. Download Intel Edison Drivers to install the required RNDIS, CDC, and DFU drivers.
3. Double-click the .exe file to begin the install.
4. Click “Next”, and click “I Agree” to the License Agreement once you’ve read through it.
5. Click “Next” in choosing the components to install.
6. It is best to leave the install directory with the default, but you may choose a location to install if you’d like. In this example we will use the default directory.
7. The drivers will now install.
8. Click “OK” when the installation has finished.
9. Click “Finish”.
10. Download the Arduino IDE (here), be sure to select the appropriate OS.
Figure 1 - List of Arduino IDEs for various Operating Systems
11. Navigate to the folder where you downloaded the .zip Edison Arduino IDE
12. It is highly recommended you download and use 7-zip (www.7-zip.org) since the default Windows zip program usually has an error with the Arduino .zip file due to extra-long file paths in the .zip.
13. Right click on the .zip file, highlight "7-zip", and select "Extract to "arduino-…"
Figure 2 - Extract Arduino IDE with 7zip
14. Open the folder that was created.
15. You can move this folder wherever you want. A common place is to create a "C:\Arduino"folder. For this example, we will stick with the "Downloads" folder where it was extracted.
16. Open the extracted folder (Figure 3)
Figure 3 - arduino.exe
17. Double-click arduino.exe and the Arduino IDE should appear
18. Click on "File > Examples > 01.Basics > Blink"
19. You should see a screen similar to Figure 4.
Figure 4 - Blink example loaded in the IDE
20. Click "Tools > Board" and select "Intel® Edison", "Intel® Galileo Gen2", or "Intel® Galileo", depending on your platform
Figure 5 - Select your board
21. Open "Device Manager (one way to find it is to click "Start" and type in "Device Manager")
22. Find the number that is shown under "USB Serial Port (COM#)", where # is a number. You will use this number in the next step.
Figure 6 - Find COM port to use in device manager
23. In the Arduino IDE, select "Tools > Serial Port" and select the number that is shown under (e.g. COM8).
Figure 7 - Select COM port
24. Click Upload to upload Blink to Edison:
Figure 8 - Upload button
25. You should see LED DS2 on your board blink every other second. The second delay is determined by the "delay(1000);" at lines 21 and 23 which specifies a delay of 1000 milliseconds between the LED turning on and off.
Figure 9– The Intel Edison with Arduino Expansion Board, LED DS2 is circled
Jump to the end of this document to explore Next Steps
Install Arduino and Blink LED (OSX)
1. Download the Arduino IDE: here (Select the appropriate OS.)
2. Navigate to the folder where you copied the .zip Arduino IDE and double-click it to open the archive. This will unzip an application in “Downloads” called “Arduino”.
Figure 10 - Extraction window
3. Rename the Arduino file “ArduinoEdison” or “ArduinoGalileo” and move it into “Applications”.
Figure 11 - Arduino IDE in Applications
4. Double-click your renamed file and this window should open.
Figure 12 - - The main Arduino IDE opening screen
5. In the Arduino IDE, click File > Examples > Basics > Blink and this window will open.
Figure 13 - - Blink example in the IDE
6. Click Tools > Board and select “Intel® Edison”, “Intel® Galileo Gen2”, or “Intel® Galileo”, depending on your platform
7. Select “Tools > Serial Port > /dev/cu.usbmodem
”.
Figure 14 - - Select your board from the Tools menu
Figure 15 - Select the cu.usbmodem port from the Tools menu
8. Click Upload to upload Blink to Edison or Galileo.
9. You will see LED DS2 on your board blink every other second. The second delay is determined by the “delay(1000);” on lines 21 and 23 which indicates a delay of 1000 milliseconds between the LED turning on and off.
Figure 16 - - The Intel Edison with Arduino Expansion Board, LED DS2 is circled
Troubleshooting:
Getting a “No such file or directory” error message when trying to upload? Try selecting a different port from “Tools > Serial Port”.
Install Arduino and Blink LED (Linux)
1. First check if you have Java installed by opening a terminal, type in “java”, and press “Enter”
Figure 17 - Install Java via command line
2. If you see the above, then you do not have Java installed and you will need to install it. Type in “sudo apt-get install default.jre
” to install the Java package.
3. You may be prompted to enter your user password.
Figure 18 - Java installation output
4. Download the Arduino IDE: here (Select the appropriate OS.)
5. Navigate to the folder where you copied the .zip Edison Arduino IDE and double-click it to open the archive.
6. Click "Extract" and navigate to the directory where you would like to unzip the Arduino IDE. In this example, we will leave it in "Download" and click "Extract"
7. Navigate to the location where you extracted the Arduino IDE and open the extracted folder
Figure 19 - Arduino IDE folder
8. Open up a new Terminal window.
9. Navigate to the Arduino IDE folder, in this example the command will be "cd Downloads/arduino-x.x.x/ and press "Enter". Where x.x.x refers to the Arduino IDE version number you downloaded.
TIP:
When you start typing in "cd Downloads/arduino", you can press "Tab" to auto-complete the folder path.
Figure 20 - Navigate to the Arduino IDE folder via command line
10. Next, type in "sudo ./arduino" to launch the IDE.
TIP: "sudo" will run Arduino with administrator privileges. You will be asked to enter your password
11. The Arduino IDE will then open
Figure 21 - New Arduino IDE window
12. In the Arduino IDE, click "File > Examples > Basics > Blink" and this window will open
Figure 22 - Blink example loaded in Arduino IDE
13. Click "Tools > Board" and select "Intel® Edison", "Intel® Galileo Gen2", or "Intel® Galileo", depending on your platform
Figure 23 - Select your board from the Tools menu
14. Select "Tools > Serial Port" and select the last "/dev/tty…" entry
Figure 24 - Select your port from the Tools menu
15. Click "Upload" to upload Blink to Edison or Galileo
Figure 25 - The upload button on the Arduino IDE
16. You should see "Transfer Complete" in the dialog box at the bottom.
Figure 26 - Transfer complete message
17. You should see LED DS2 on your board blink every other second. The second delay is determined by the "delay(1000);" at lines 21 and 23 which specifies a delay of 1000 milliseconds between the LED turning on and off.
Figure 27 - The Intel Edison with Arduino Expansion Board, LED DS2 circled
Troubleshooting:
Getting a "No such file or directory" error message when trying to upload? Try selecting a different port from "Tools > Serial Port".
Next Steps
You have now successfully gotten your Edison board to blink its on-board LED using the Arduino IDE. To explore further capabilities of your device please refer to the Arduino documentation at http://arduino.cc/en/Tutorial/HomePage.
For a good hardware primer check out the Grove Starter Kit Wiki which includes an overview and example code for all the hardware included in the Grove Starter Kit Plus. If you have other hardware often Googling "my hardware Arduino" will come up with example code and libraries to use.
NOTE:
The Edison with the Arduino Expansion Board and the Galileo can be treated as an Arduino Uno and is compatible will all Arduino Uno sensor shields. However it should be noted that Pins 10 and 11 on the Edison are NOT in fact capable of variable voltage output (PWM) despite being marked so on the Expansion Board.
If you wish to learn about the other features of the Intel Edison including connecting it to your Wifi and programming it via the Intel XDK follow the links below:
link to cloud
link to XDK guide
link to WiFi guide
Troubleshooting:
If you have any issues which you cannot resolve please feel free to head to Intel Edison Forums to post your questions and look for solutions.
Resources
- Edison Arduino Expansion Board Hardware Guide
- Edison Arduino Expansion Board Schematic
- Edison Breakout Board Hardware Guide (For Edison pinout, see page 9.)