On Github surendharreddy / edison
Created by OpenHardwareDays / @openhardwareday
The Edison is the powerful new computing module from Intel®. It’s tiny enough to embed into wearable projects, versatile enough to manage internet-of-things applications, and powerful enough to control robotics platforms.
The Edison packs a host of features, including WiFi (802.11a/b/g/n), Bluetooth (4.0 and 2.1 EDR), UARTs, I2C, SPI, USB, and 40 GPIO. It’s driven by a 32-bit Intel® Atom™ Processor clocked at 500MHz, supported by 1GB of LPDDR3 RAM and 4GB eMMC flash memory. To top it off, it’s housed in a tiny, 35.5 x 25.0 x 3.9 mm module.
Host Operating System Requirements. This guide is for the following 64-bit Windows* systems: Windows 7, 8, 8.1 and 10. Physical Material Requirements The Intel® Edison compute module is meant to be used with a breakout board and is typically bought together with a kit containing the compute module and a breakout board. 1 Intel® Edison compute module 2 Arduino* expansion board 3 Assembly hardware 4 Micro-B USB to Standard-B USB cables (x 2) 5 Direct current (DC) power supply
Download Arduino for Edison Download Here
Download and Install the FTDI Drivers
Download HereDownload and Install the Edison Drivers (Windows Only) Download Here
Let’s start by plugging the Edison into your base board, whatever that may be. Keep in mind that the Edison’s Hirose connectors are very delicate. When plugging your Edison into a base board, take care to push straight down, applying even pressure to the connector and the left corner of the Edison.
Once the Edison is cleanly seated into your base board, wire up the USB port(s) to your computer. If your base board has two USB ports, it’s recommended that you connect both up to your computer – one port provides power and direct USB access, while the other connects to the Edison’s console. If you’re using Intel’s Arduino Expansion Board or the Mini Breakout, make sure you have at least connected USB to the Edison’s USB OTG port. That is the only port that can power the Edison.
Edison will show up as three different devices on your computer:1-USB Mass Storage device 2-Intel Edison Virtual Com Port3-Intel Edison USB RNDIS Device The removable storage device called “Edison” is the best indicator that it’s working.
It means the Edison has
booted up
enumerated over USB and is ready to be programmed
Windows users plugging their Edison in for the first time may have to wait an extra minute or so while drivers are set up. Once that’s complete, you should be notified with a handy window like this, which also passes along important information about the Edison’s COM port assignment.
Don’t forget the COM port, or, if you didn’t get the notification, check for the Edison’s COM port assignment in your device manager.
With a built-in C-compiler, Python, Node.js, and more, the Edison is capable of amazing things we really recommend exploring the Edison’s full capabilities by writing your applications inC - C++ - Python - Node.js anything that takes full advantage
Now we’ll examine how to program the Edison in Arduino cover some common troubleshooting point out some useful examples to help get you started.
This section requires a base block with a USB OTG port – that means you won’t be able to use the Arduino IDE with the Console Block. If that’s all you have, skip ahead to the Setting Up the Console section.
By now you should have the Edison powered and plugged into your computer (connecting the Edison’s OTG USB port to your computer), drivers set up, and Arduino for Edison software installed. If not, refer back to the previous sections of this tutorial.Open up the Edison-specific Arduino software. This software is nearly indistinguishable from other Arduino builds. To make sure you’re using the right version, go up to the Tools > Board menu and select Intel® Edison
Next, select your serial port by going to Tools > Serial Port and select the COM port number that matches your new Edison.
File > Examples > 01.Basics > Blink. And click the Upload icon. After the compile, the code should quickly upload over to the Edison. Look for a “Transfer Complete” notification in the console window below.
Don’t fret if you get an upload error! We’ve gotten a lot of them too. For most problems, there’s usually no-better a fix than the old restart. This interface can be finicky, if you get an upload error try unplugging the Edison then plugging it back in and trying again. If that doesn’t help, consider checking out Intel’s Edison forum.
We’ve loaded up the blink example, but on many boards the Edison doesn’t even have an LED to blink. Here are some other handy examples that prove the Edison is working, and provide some insight into how the Edison’s Arduino interface works.
As always, the Arduino serial monitor is a handy debugging tool. Give some of the examples in the File > Examples > 04.Communication folder a try, or load up something simple like this:
void setup() { Serial.begin(9600); } void loop() { if (Serial.available()) { Serial.print("Decimal value: "); Serial.print(Serial.read()); Serial.println(); } }
WiFi is one of the most important features embedded into the Edison, and it’s supported in the Arduino IDE by an updated WiFi library. Try loading up any of the examples in the File > Examples > WiFi folder – the “WiFiWebClient” example is a good one. You’ll probably have to update the SSID and passkey before uploading.
The Arduino Expansion Board, Edison Mini Breakout, and the SparkFun Console Blocks all route the console UART out through an FTDI chip, which converts serial to USB. If you haven’t already, plug your Edison into the base board and power your base board (in most cases by hooking up the USB OTG port). Then connect the base board’s debug port to your computer via a USB cable. Each of these boards have two micro-B USB ports, make sure you plug into the correct one! Make sure you have the FTDI drivers installed. If you need any help, check out our How to Install FTDI Drivers tutorial.
Opening Up a Serial Terminal Emulator The next step is to open up your favorite terminal emulator software on your computer. If you don’t have a favorite, check out our Serial Terminal Basics tutorial. Make sure the new COM port for your base board is correctly set. You’ll also need to set the baud rate to 115200bps (8-N-1).
Most Edison’s ship with an older version of the firmware. Updating to the latest version of the firmware equips the Edison with a whole host of new utilities, including a WiFi configuration tool and a fix to that annoying 5-second sleep in the terminal. This step requires access to both the Edison’s OTG USB port and the console. That means you’ll need two USB cables, connected to two ports on your computer (or a hub).
The OTG port will give us access to the Edison’s USB mass storage device. You can either update firmware with the Intel Installer or the manual way.
ntel is continuing to improve the Edison support. Now, there is an Installer to make updating your firmware a breeze. There is an option to install the Arduino IDE too. Head over to the Edison Getting Started Guide on the Intel Developer Zone site. If you already assembled your board, jump to “Step 2: Choose your Operating System”. Pick your operating system and download the Installer.
Open up the Installer. You will be asked to install as administrator. Follow through the rest of the steps and you are good to go! Next step will be to set up a serial terminal and connect to WiFi.
Manually Updating the Firmware We’ll begin by downloading the latest and greatest version of the Edison firmware, grab it from the Edison Software Downloads page.
Download the “Edison Yocto complete image” it’s about 100 MB. Then unzip the archive, and keep the extracted contents up somewhere handy.
Before you load the new firmware onto the Edison, make sure all of the old stuff is out of the way. Use your terminal (Mac) or CMD (Windows), and navigate to the top level of your Edison’s mass storage drive. On Mac, type cd /Volumes/Edison. On Windows type E: – replacing “E” with the drive letter of your Edison. Once inside the folder, type
rm -rf *and
rm -rf \.*to remove all of the files – hidden or not – from the drive.
Next, open up the Edison mass storage drive in your file explorer. Then move everything from within the extracted ZIP folder into the drive. It should look a little something like this:
Finally, begin the update by opening your Edison’s console and entering this command: reboot ota. The Edison will shut down, then, as it begins to reboot, it will notice there’s a flash update in the mass storage device and begin to install the update. The update will take a minute-or-so to install, and the Edison will reboot one last time. When the Edison comes back up, log in as root and take comfort in knowing your Edison is running the latest and greatest version of the Edison Yocto image.
The latest version of the Edison firmware includes a handy utility to set up WiFi – configure_edison --setup. Type that into your Edison’s console, then follow the in-terminal directions as you can edit the Edison’s name and WiFi settings.
Finally we get to the reason we’re here. Type ‘Y’ to jump into the WiFi setup utility. The Edison will scan for nearby wireless networks, after a few seconds it will list the results.
Type a number to pick an SSID, then enter your passkey and wait for it to (try to) connect.
The last line of the configure utility will prompt you to open your browser and point to the Edison’s local IP.
You won’t glean a lot of information from this page, but it will provide some assurance that your Edison is on the WiFi network. Plus, just think of all the fun you can have with a tiny little credit card-sized computer that can serve up web pages like this! You can use the console for other network-related stuff now, too. Try pinging your favorite web site with a command like ping sparkfun.com -c 4. Or check your network status with a command like ifconfig or ifconfig wlan0. Now that your Edison’s on the WiFi network, you can do all sorts of cool stuff. How about SSH-ing into it, so you can remotely interact with little computer’s file structure?
If you’ve gotten this far, you may begin to realize that interacting with your Edison via the command line may get a bit tiresome. Luckily, now that you have WiFi set up, you can (figuratively literally) cut the cord and control your Edison through the network using SSH (Secure Shell). You can even download and upload files to the Edison overSFTP (SSH file transfer protocol). In order to SSH into your Edison, you’ll probably another piece of software installed on your computer. We likeWinSCP for Windows machines andCyberduck on the Mac.
When you open WinSCP, it’ll ask you where and how you’d like to log in. Make sure “File Protocol” is set to “SFTP”. Then, in the “Host name” text box, type the IP address of your Edison. For the “User name” and “Password” boxes, type “root” and the password you set (or leave it blank if you skipped that part).
(Personal frustration note: if you’re having trouble SSH-ing into your Edison, you may need to turn off your Windows Firewall. Hopefully you don’t have to ram your head against that wall for too long. Active VPN’s may also get in the way!) Once you click “Login”, the program will attempt to remotely log in to your Edison. If it’s successful, you’ll be greeted with a file browser. These are the actual files living on your Edison! You can use this browser to upload or download files. This is a great utility if you’re developing programs to be run on the Edison, your only other option is monochrome vi in the terminal (which would be pretty hardcore). WinSCP also includes a utility for interacting with the remote host via a terminal. Go to “Commands” > “Open Terminal” and you’ll be right back to the console.
It’ll be the same idea in Cyberduck. Type your Edison’s IP address into the “Server” box. Then type “root” as the “Username” and your password if you set one. Then hit “Connect.”
Like WinSCP, Cyberduck will present you with a file explorer. This will allow for an easy, graphical interace for managing your Edison’s files. If you’d like to interact with the console remotely, open up your Mac’s terminal application. Then type ssh root@10.0.0.20, making sure to sub in your Edison’s IP address. When/if prompted for a password, type that in, then you’re back to the Edison console.