It will do what you want if ask correctly, in the proper sequence
Overview
- IoT Hardware Basics
- First project
- Sensors
- Connect power
- Connect to PC
- Firmware download
- Working the Edison board
- Board operating sytem
- Development languages
- IDE Software on computer
- Embedded apps
- LED Blink Embedded app
- Temp sensor on shield
- Gateway
- Cloud services
- Support Serial Numbers
- Social Media
- Events
- Resources
- Acronyms
- Learning resources
- More on IoT
This article shows those new to electronics how to install, configure, and use the Intel Edison board and XDK IDE for simple projects. Instructions are for Apple Mac.
I want you to feel confident that you’ve mastered this skill. That’s why this takes a hands-on approach where you type in commands and we explain the responses and possible troubleshooting. This is a “deep dive” because all details are presented.
Like a good music DJ, I’ve carefully arranged the presentation of concepts into a sequence for easy learning, so you don’t have to spend as much time as me making sense of the flood of material around this subject.
Sentences that begin with PROTIP are a high point of this website to point out wisdom and advice from experience. NOTE point out observations that many miss. Search for them if you only want “TL;DR” (Too Long Didn’t Read) highlights.
Stuck? Contact me and I or one of my friends will help you.
IoT Hardware Basics
Intel boards are based on Intel’s X86 architecture, Raspberry Pi and Beaglebone are based on the alternative 3.3V ARM 11 chip architecture.
Intel boards do not have an HDMI video port like a Raspberry nor keyboard port like on PCs.
The Galileo was Intel’s initial board. It does not have on-board WiFi. It has the same form factor as the Edison board released in 2014.
https://www.youtube.com/watch?v=GY8kaaFzbTE
Both the Galileo and Edison have pinouts compatible with 5V Arduino boards, so a shield such as Grove can be integrated. The Grove is a co
Intel Edison is a dual-core Silvermont Atom(TM) clocked at 500MHz. It’s called a System on a Chip (SoC) because it packs so many capabilities: 4GB of storage (plus micro SD card slot), 1GB RAM
NOTE: The Edison has on-board WiFi and Bluetooth, so cost $50 vs. $35 for the Arduino UNO which require additional hardware for WiFi and Bluetooth, but it has Analog I/O.
-
PDF: Hardware Guide: Intel® Edison Kit for Arduino from here contains a block diagram, header signal list, and other details. The board supports 40 GPIOs and includes 1 GB LPDDR3, 4 GB EMMC, and has dual-band WiFI and BTLE.
-
The Intel® Edison kit for Arduino has a 100 mA charging current.
-
The Intel® Edison Breakout Board has a 190 mA charging current.
PROTIP: The Edison runs 1.8V logic with current drive of 3mA. (lower power than TTL or CMOS on other boards) Not enough to power an LED.
This Intel Arduino breakout also has an SD card connector, micro USB or standard sized
Intel also has a Mini Breakout board. Get your first “blink” LED on the mini breakout board.
Intel’s Gateway is hardware and software that collects data from IoT devices for aggregation in a cloud service, which provides analytics.
First project
-
Blink an on-board LED does not require additional items. So this “embedded app” project is a good first project to get familiar with the basics working.
-
Follow instructions here to create a temperature monitoring app using Intel® XDK receiving temperature from a sensor connected via a Grove* Cable plugged into a Grove Base Shield.
Sensors
The sensors and other components Intel supports are listed at: https://software.intel.com/en-us/iot/hardware/sensors, where code samples are provided for each component in C/C++, JavaScript, and Python programming languages. Code is also included in Intel’s XDK IDE, accessed from its “IoT Sensor Library Explorer” shown at right (described in a later section).
The wiki page for each sensor, actuator, etc. are listed below.
The “SeeedStudio Grove starter kit plus for Intel Edison IoT Edition” $79 provides a set of common sensors as well as an Arduino UNO R3 (layout with 4 PWM instead of 6 PWM) expansion board. It hooks on top of an Arduino 101 breakout board. Its use with the special Grove cable means no soldering is needed to use the 6 analog inputs, and 20 ditial input/output pins.
Sensors
- 3-Axis Digital Accelerometer (±1.5g) MMA7660FC
- Button D2
- Temperature (grovetemp) A0
- Touch Sensor (grovebutton)
- Light Sensor (grovelight) A1
- Sound Sensor (microphone) LM386
- Rotary Angle Sensor(P) A2
- Pieze Vibration Sensor (Flex/Force LDT0-028)
Actuators:
- LED (Green) (groveled) D3
- LED (Red)
- LED (Blue)
- LCD 16x2 RGB Backlight (Display my9221)
-
Buzzer D5
- Mini Servo
- Smart Relay
Additional sensors from Grove include:
- Barometer
- Infrared temperature Sensor
- $40 GPS module
- CO2
- Compass
-
Color Sensor tcs3414cs
-
GSR (Galvanic Skin Response) measures electrical Conductance on a finger. Eelectrical Modle</a> Sensitivity is adjusted via a potentiometer. Strong emotion can cause stimulus to your sympathetic nervous system, resulting more sweat being secreted by the sweat glands. Grove – GSR allows you to spot such strong emotions by simple attaching two electrodes to two fingers on one hand, an interesting gear to create emotion related projects, like sleep quality monitor.
- Weather Shield (relative humidity, barometric pressure, temperature, light intensity)
- $80 Weather Meters (Wind Vane, Cup Anemometer, Tipping Bucket Rain Gauge)
Additional:
-
Speaker
-
Wireless communiction: xbee
-
TFT (Thin Film Transitor) display such as the $35 Adafruit 2.8” 240x320 pixel resistive touch screen shield ILI9341 which uses SPI to communicate and this code
-
Personal Area Network Server featuring text to speech.
Projects
Among projects described in websites:
these:
-
Youtube: Speech-activated LEDs is detailed on Esther Kim’s Github repo
-
Build Your Own Face-Recognition System using OpenCV
-
Sound and vibration sensors recognize when laundry is done, and sends an SMS text with the length of the wash or dry cycle.
-
“Twitter dogs” Hackster.io
Connect power
-
CAUTION: Discharge static before you touch anything.
-
Handle PCB (Printed Circult Boards) by the edges.
-
The switch on the top edge of the board should be toggled to 5V.
-
The switch among the plugs (1 in the diagram) should be toggled to whatever side is plugged in.
PROTIP: It’s best to power your Intel® Edison board with the external DC power supply, with the round barrel connector (4 on the diagram).
PROTIP: However, plug in a USB cable from a USB 3.0 port on your host computer (laptop) to the middle USB connector on the board to provide current to drive the LCD display.
-
Slide the micro-switch “SW1” (multiplexer USB 2.0 OTG interface) toward the USB Type micro-B (the small one that goes into mobile phones) to select device mode.
Slide the micro-switch toward the larger USB Type A recepticle for to select device mode operation.
TFT display
Remote operation
It is possible to have the Edison operate remotely off solar and battery power. A battery is needed evenings and on cloudy days.
Sparkfun.com has this set of components:
-
$25 SparkFun Sunny Buddy - MPPT Solar Charger (maximum power point tracking) controller has a port from of solar panel supplying from 6V to 20V. Its maximum charge current is 450mA.
(rocketscream boards is an alternative)
It receives input power via its barrow connector __?
-
Solar panels for this include the $265 SolarGorilla
Connect to PC
The Edison board provides several ways to move data.
There are several build-in commands that can be used to connect your PC to the board, described below. If you installed Bloop, connect with a single utility command:
bloop c
This automatically connects you via “screen” to an attached Edison device.
### Install Bloop #
https://www.npmjs.com/package/bloop
is a set of command-line tools for working with Intel Edison on the PC (laptop) side.
-
Install bloop globally:
npm install -g bloop
The response:
/usr/local/Cellar/node/6.3.0/bin/bloop -> /usr/local/Cellar/node/6.3.0/lib/node_modules/bloop/bloop.js /usr/local/Cellar/node/6.3.0/lib └─┬ bloop@0.1.3 ├── commander@2.5.1 └─┬ promptly@0.2.1 └─┬ read@1.0.7 └── mute-stream@0.0.6
Read about its commands from its creator Rex St. John (@rexstjohn)
BLAH: After install, I got a “command not found”. So we’re sticking with built-in commands below.
Serial connection
-
Connect a USB cable to the micro-USB port at 2 on the diagram.
by Intel Evangelist Daniel Holmlund (@agnathan)
Alternately, for Windows
PROTIP: On a Mac, plug in BOTH mico-USB cables.
-
Open a Terminal shell window. Alternately, take the manual approach:
-
List UART devices connected on /dev/ttyMFD1.
ls /dev/tty.*
The response is like:
/dev/tty.Bluetooth-Incoming-Port /dev/tty.usbserial-A90400YX
NOTE: The “A90400YX” in this example will be different on your device.
-
Highlight and copy the part such as “/dev/tty.usbserial-A90400YX” and paste to assemble this command:
screen /dev/tty.usbserial-A90400YX 115200 -L
-
The
115200
specifies the “baud” speed of communications (the highest theorectical maximum of 230,400 bits per second). -
The
-L
flag turns on output logging.
TROUBLESHOOTING: If “Sorry, cannot find a PTY”, try closing the terminal, open another terminal, power down the board, and bring it up again.
-
-
Press Enter when the blank terminal appears.
Press Enter twice for the Edison board.The response should be something like this:
Poky (Yocto Project Reference Distro) 1.7.3 edison ttyMFD2 edison login:
NOTE: The “edison” above is the name of the board setup before.
-
Type root. There is no other user name on the Edison.
A new board would have no password.
-
If a password prompt appears, one was specified by a previous user. If you don’t know the password, flash the firmware again (see below).
Sucess is this line (but instead of “edison”, your user name would appear):
root@edison:~# _
Skip to verify version or MRAA install.
PROTIP: When exiting from a screen session, press Ctrl + D to detach cleanly.
Firmware download
PROTIP: The device you have may have obsolete firmwware.
DEFINITION: Firmware is the operating system of embedded microcontrollers.
Flashing is the process of overwriting the firmware on the board’s memory, much like applying system updates on your computer.
Mac El Capitan
I wasted several days scratching my head until I finally tweeted @inteliot and (my hero) Rex St. John (who also wrote bloop) replied (on a Friday evening). Rex is the author of this blog and these instructions which got me going on El Capitan (the latest OS on Mac OSX).
- Open Mac’s Spotlight (“Command + Space Bar”).
- Type “Disk Utility”
-
Erase (re-format) the EDISON to “MS-DOS (FAT)”.
-
Install these:
brew update
brew install dfu-util coreutils gnu-getopt
brew tap jlhonora/lsusb
brew install lsusb-
dfu-util is the device firmware ugrade utility.
-
coreutils replace Mac’s BSD version with the GNU version used by Linux.
-
gnu-getopt is used to parse command-line options.
-
brew install lsusb list USB devices in Mac OS X, just like the lsusb command in Linux.
At the Intel® Edison Module Downloads page, rather than using the integrated “Installers” GUI program (Intel_Edison_Setup_Mac_v2016.2.013), I
-
-
click to download the “Latest Yocto* Poky image” After unzip, the folder on my machine is:
/Users/mac/Downloads/iot-devkit-prof-dev-image-edison-20160606
-
Finally, on a Terminal at the Yocto folder downloaded:
./flashall
- Reboot
Windows Only
-
On an internet browser:
https://software.intel.com/en-us/iot/hardware/edison/downloads
QUESTION: maker.intel.com redirects to http://www.intel.com/content/www/us/en/do-it-yourself/maker.html
-
Click “Windows* 64-bit” to download the installer:
intel_edison_setup_win_v2016.2.007.exe
-
In File Explorer, click to expand (unzip) the file.
-
Double-click the file so the “Intel Edison Configuration Tool” appears.
-
Click Next, I accept, Next, Next.
It should go to “USB drivers installed”.
PROTIP: If it’s stuck on “The Intel Edison is not connected”, see Troubleshooting Guide.
-
Click Flash Firmware. Click Next to download.
“Download the latest image version 201606061707”.
Does this version match with the version from the board obtaind above?
-
Click Next.
Working the Edison board
Here are operations you need to know:
Reboot interrupt serial
I reboot the Edison by unplug and re-plug everything from the board.
BLAH: This blog suggested the following to recover password. But it didn’t work for me.
-
Reboot the Intel Edison by pressing button 6 on this diagram:
Reset
This says DO NOT press the Reset button due to a hardware bug.
Pressing and holding this button for 4 seconds will restart the Intel® Edison. Alternately, pressing and holding this button for 8 seconds will reset the Intel® Edison setting all the IO pins to high impedance state with no pull-ups.
-
When you start to see the boot up message, press any key to stop autoboot, and see this:
boot > _
-
Type:
run do_ota
The flashing process takes 2-3 minutes, with Edison rebooting a couple of times.
Starting Hostname Service... Starting The Edison status and configuration service... [ OK ] Started The Edison status and configuration service. Starting Intel_XDK_Daemon... [ OK ] Started Intel_XDK_Daemon. [ OK ] Started WPA supplicant service. [ OK ] Started Hostname Service. [ OK ] Created slice user-0.slice. Starting User Manager for UID 0... [ OK ] Started PulseAudio Sound System. Stopping Daemon to receive the wpa_supplicant event... [ OK ] Stopped Daemon to receive the wpa_supplicant event. Starting Daemon to receive the wpa_supplicant event... [ OK ] Started Daemon to receive the wpa_supplicant event. [ OK ] Started User Manager for UID 0. [ OK ] Started Wyliodrin hypervisor. [ OK ] Started Wyliodrin server. [ OK ] Reached target Multi-User System. Starting Redis Server... [ OK ] Started Redis Server.
Board Version
-
List the version code of the firmware installed:
cat /etc/version
Example:
201606061707
The first characters are obviously the year (2016), month, and day.
QUESTION: Is 1707 the time? If so, what time zone?
Power Up and Down
Power down the Edison by holding down the PWR button for _ seconds.
To power it up just press and hold the PWR button again.
- Use your mouse to expand the height of your terminal screen.
-
Get a list of configuraton commands:
configure_edison –help
usage: configure_edison [-h] [[--setup | --name | --password | --wifi] [--showWiFiIP | --showWiFiMode | --version | --latest-version | --disableOneTimeSetup | --enableOneTimeSetup | --toggleOneTimeSetup | --upgrade | --flash
[ ...] | --flashFile | --showNames] optional arguments: -h, --help show this help message and exit --setup Goes through changing the device name, password, and wifi options --name Changes the device name --password Changes the device password --wifi Changes the wifi options --showWiFiIP IP address associated with the wireless interface --showWiFiMode Show current mode for the wireless interface --version Gets the current firmware version --latest-version Gets the latest firmware version --disableOneTimeSetup Disable one-time setup with WiFi access point and enable WiFi client mode Append --persist to retain this setting after reboot --enableOneTimeSetup Enable one-time setup with WiFi access point and disable WiFi client mode. Append --persist to retain this setting after reboot --toggleOneTimeSetup Switch between one-time setup with WiFi access point and WiFi client mode, and visa-versa. Append --persist to retain this setting after reboot --upgrade Downloads the latest firmware. Append --restartWithAP to reboot in WiFi access point mode after flashing --flash [ ...] Downloads and flashes an image Append --restartWithAP to reboot in WiFi access point mode after flashing --flashFile Flashes the given image (.zip). Append --restartWithAP to reboot WiFi access point mode after flashing --showNames Show device name and SSID </pre> -
other commands include (optionally):
configure_edison –name
configure_edison –passwordConfigure wifi
-
Type:
configure_edison –wifi
The board now scans for SSIDs:
Configure Edison: WiFi Connection Scanning: 1 seconds left 0 : Rescan for networks 1 : Exit WiFi Setup 2 : Manually input a hidden SSID 3 : NETGEAR19 4 : green Enter 0 to rescan for networks. Enter 1 to exit. Enter 2 to input a hidden network SSID. Enter a number between 3 to 4 to choose one of the listed network SSIDs: _
-
Click the number associated with your wifi name (such as 3) and press Enter. (Do this quickly as there is a time limit)
Is green correct? [Y or N]: y
-
Type capital Y.
Password must be between 8 and 63 characters. What is the network password?: ******
-
Enter your network’s password. The response:
Initiating connection to green. Please wait... Attempting to enable network access, please check 'wpa_cli status' after a minute to confirm. Done. Please connect your laptop or PC to the same network as this device and go to http://192.168.0.100 or http://edison.local in your browser.
NOTE: http://edison.local/ references a little web server running on the Edison.
-
To confirm:
ping 192.168.0.100
Press command+C when you see something like this:
PING 192.168.0.100 (192.168.0.100): 56 data bytes 64 bytes from 192.168.0.100: seq=0 ttl=64 time=0.386 ms
Connect via wifi
-
On another Terminal shell window, connect via wifi:
ssh root@eddie.local
-
To bring the interface up and down:
ifconfig usb0 down
ifconfig wlan0 down
ifconfig usb0 up
ifconfig wlan0 upSee https://software.intel.com/en-us/connecting-to-a-network-intel-edison-board
https://software.intel.com/en-us/connecting-your-intel-edison-board-using-wifi
Configure Bluetooth
For more information, see see this pdf.
-
Enable bluetooth
connmanctl enable bluetooth
Board operating sytem
The default firmware on the Intel® Edison board is a version of Linux built using the Linux Yocto Project which started in 2010. Yocto merged with OpenEmbedded in 2011. https://www.youtube.com/watch?v=zNLYanJAQ3s
- http://www.yoctoproject.org/docs/1.6.1/mega-manual/mega-manual.html
- https://www.yoctoproject.org/docs/2.1/mega-manual/mega-manual.html
### Alternative OS #
Brillo is an alternative operating system from Google* based on Android that can run on the Intel® Edison board instead of the default Linux* OS built using the Yocto Project*. If you plan on using Brillo and your Brillo invitation has been approved, you do not need to run the setup tool. Instead continue to the Brillo codelab.
### View files on board #
-
View folders and files in the present working directory:
pwd
The response:
/home/root
-
What version of Python is installed?
python –version
The response:
Python 2.7.3
Development languages
-
Java Code Samples:
https://software.intel.com/en-us/blogs/2016/07/15/20-how-to-intel-technology-code-samples-now-available-in-java
-
Even though Intel does not provide an IDE for the Python programming language, a Python interpreter comes preinstalled on the board, plus there is Python support in the sensor library:
http://iotdk.intel.com/docs/master/upm/python/
Node-RED
Applications doing M2M (Mobile to Mobile) can be created using the drag-and-drop UI from nodered.org. The program was written in NodeJs, and export JSON blocks called the “Node-RED” visual programming language.
It’s supported by Intel, Samsung.
Brian Innes has videos “Getting started with Intel Edison and Node-RED”
IDE Software on computer
You can use these IDEs to develop apps:
PROTIP: C/C++ is not supported on Mac OSX.
For Java and C/C++, download from:
Intel® System Studio IoT Edition
For JavaScript (NodeJs), download from:
Intel XDK IoT edition installer
xdk_web_mac_master_3491.dmg (222 MB)
-
https://www.youtube.com/watch?v=89har3Yv4YI
Set Up the Intel XDK IoT Edition Part1 - Installation -
First, watch the inspiring video:
https://software.intel.com/en-us/xdk/videos/getting-started-with-the-intel-xdk -
xdk.intel.com redirects to
https://software.intel.com/en-us/intel-xdk - https://software.intel.com/en-us/getting-started-with-xdk-and-iot
- https://software.intel.com/en-us/xdk/docs/intel-xdk-guided-tutorial
- https://software.intel.com/en-us/forums/intel-xdk for support.
- http://www.intel.com/software/xdkdocs for documentation.
https://software.intel.com/en-us/html5/xdk-iot
NOTE: Intel’s IoT repurposes Apple’s Bonjour service
to auto detect IoT devices and detect multicast DNS service discovery.
This is on Apple computers.
So Windows machines need to install Apple’s Bonjour Print Services for Windows program
http://support.apple.com/downloads/DL999/en_US/BonjourPSSetup.exe
PROTIP: When creating a folder and project name, initalize it as a Git repo.
-
Arduino Sketch
Types of apps
-
Internet of Things embedded apps are mobile apps that executes on a real mobile device (such as a smart phone or tablet) interacting with users and onboard sensors on the mobile device.
Onboard sensors on mobile devices include accelerometer, geo location, etc.
-
Web apps on a mobile device have users open a web browser and require internet access for execution on a web server. These are also called “HTML5” apps for the format of web pages displayed by web apps. These apps are invoked by specifying a URL on the web browser rather than clicking on an app icon on the mobile device.
-
Hybrid apps are called hybrid because users open such apps by downloading them from the Google Play store, but the app executes within a web app window. The Cordova library enables JavaScript to access onboard sensors. Such apps are generally slower than real apps.
The “Standard HTML5” app created without the App Designer based on
https://github.com/gomobile/template-blank
The “Standard HTML5” app created using the Designer based on
https://github.com/gomobile/template-blank-ad-project
The “HTML5 + Cordova” app created without the App Designer based on
https://github.com/gomobile/template-blank-cordova-project-lite
The “HTML5 + Cordova” app created using the Designer based on
https://github.com/gomobile/template-blank-cordova-ad-project
Embedded apps
The code base for embedded apps consists of JavaScript which executes on a Node.js runtime on the board.
It requires an IoT maker board and is not built like mobile web apps for phones and tablets.
This approach requires these libraries:
https://software.intel.com/en-us/node/637972
LED Blink Embedded app
This “embedded” app project does not require additional items as it blinks an on-board LED.
The steps below are an expansion of instructions here.
XDK IDE
-
Invoke the Intel XDK program.
It uses the Brackets Code editor described at https://software.intel.com/en-us/xdk/docs/using-the-editor-in-the-develop-tab
- Select “Embedded”.
- Select “LED Blink”.
-
Specify a folder path
PROTIP: Create the project under a folder for coding, such as “gits”.
Template source code to read sensor data from:
https://github.com/gomobile/iotapp-local-temperatureNotice there are only a few files in a Node program.
-
Under the XDK DEVELOP tab,
Connect to device
-
First, establish wi-fi to get the IP address.
-
In XDK, for “IoT Device:”, select the IP address:
Intel XDK - IoT App Daemon v0.1.4 - Node: 4.4.3, Arch: ia32
-
Click the download icon. This should appear in XDK’s “Intel XDK IoT” tab:
No NPM modules found. transferring /var/folders/j_/gh27gpxj1t58hyryfg9drvdc0000gn/T/xdk-8522mfkku4w.tar from project to board x README.md x icon.png x main.js x package.json x xdk/project-info.json Upload Complete Not auto starting by request
A Node program includes a package.json file to define the version of Node and of each dependency library.
The main.js file defines the logic. At the top, variables are defined, then functions called by others. The first line is usually a console.log function that prints a message out.
-
Click the Run icon Run icon. You should see an LED on your board flashing on and off. Also this message:
MRAA Version: v1.2.3
CONGRTUALTIONS!
-
Click the Stop icon Stop icon to stop the LED. Also this message:
=> Stopping App <=
Change the blink rate
-
In main.js, notice the 1000 milliseconds (1 second) between blinks.
Change the number to a smaller one (500) to blink less frequently.
-
Click download icon. Click to confirm re-load.
- Click Debug icon to opens in a new Debugger window.
- Adjust the window’s size.
-
Press F10 to step over code or F11 to step into each routine.
Check device date
- Open a Terminal shell window and connect to the board.
-
Type in command:
date
The response is this format:
Sat Aug 13 12:48:57 UTC 2016
Sync the date
-
Click the “Manage your deamon/IoT device” icon:
-
Select “Sync PC time w/clock on target device”.
New System Time: Sat Aug 13 2016 12:49:25 GMT+0000 (UTC)
Load from internet
Instead of using XDK, do it all from the command line:
-
Open a Terminal shell window and connect to the board.
-
Verify node:
node –version
The response:
v4.4.3
-
Verify node:
cd /usr/src
wget –no-check-certificate https://github.com/intel-iot-devkit/mraa/blob/master/examples/javascript/Blink-IO.jsThe response:
--2016-08-13 12:22:42-- https://github.com/intel-iot-devkit/mraa/blob/master/examples/javascript/Blink-IO.js Resolving github.com... 192.30.253.113 Connecting to github.com|192.30.253.113|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: 'Blink-IO.js' [ <=> ] 88,948 235KB/s in 0.4s 2016-08-13 12:22:49 (235 KB/s) - 'Blink-IO.js' saved [88948]
-
Run the program:
node Blink-IO.js
BLAH: I got this error:
<!DOCTYPE html>
SyntaxError: Unexpected token < at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:373:25) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Function.Module.runMain (module.js:441:10) at startup (node.js:139:18) at node.js:968:3 </pre>
### MRAA Install #
https://github.com/intel-iot-devkit/mraa
Low level skeleton C/C++ library for IO communications on GNU/Linux platforms
for (Node) JavaScript and Python.
To control more complex sensors and actuators: https://github.com/intel-iot-devkit/upm a higher-level library that leverages mara.
-
List files where MRAA is installed:
cd /etc/opkg
ls -lac –time-style=long-isoThe response I got:
total 24 drwxr-xr-x 2 root root 4096 2016-08-13 01:18 . drwxr-xr-x 89 root root 4096 2016-08-12 02:49 .. -rw-r--r-- 1 root root 94 2016-06-07 00:51 arch.conf -rw-r--r-- 1 root root 0 2016-06-07 00:51 base-feeds.conf -rw-r--r-- 1 root root 277 2016-06-07 00:52 iotkit.conf -rw-r--r-- 1 root root 60 2016-08-13 01:18 mraa-upm.conf -rw-r--r-- 1 root root 791 2016-06-07 00:51 opkg.conf
NOTE: opkg is an unofficial Linux repository which uses its base-feeds.conf file to provide access to many package, saving you the hassle of compiling from source. Some projects append additional dependencies to the bottom of the file, such as:
echo “src/gz all http://repo.opkg.net/edison/repo/all src/gz edison http://repo.opkg.net/edison/repo/edison src/gz core2-32 http://repo.opkg.net/edison/repo/core2-32” » /etc/opkg/base-feeds.conf
-
SSH onto the board to install or update MRAA on the board:
echo "src mraa-upm http://iotdk.intel.com/repos/1.1/intelgalactic" > /etc/opkg/mraa-upm.conf
There is no response from this.
-
Update the library onboard and upgrade to the latest version:
opkg update
The response is like this:
Downloading http://iotdk.intel.com/repos/3.5/intelgalactic/opkg/i586//Packages. Updated list of available packages in /var/lib/opkg/iotkit. Downloading http://iotdk.intel.com/repos/3.5/iotdk/edison/all/Packages. Updated list of available packages in /var/lib/opkg/iotdk-all. Downloading http://iotdk.intel.com/repos/3.5/iotdk/edison/core2-32/Packages. Updated list of available packages in /var/lib/opkg/iotdk-core2-32. Downloading http://iotdk.intel.com/repos/3.5/iotdk/edison/edison/Packages. Updated list of available packages in /var/lib/opkg/iotdk-edison. Downloading http://iotdk.intel.com/repos/1.1/intelgalactic/Packages. Updated list of available packages in /var/lib/opkg/mraa-upm.
-
Upgrade to the latest version:
opkg upgrade
If the current version is good, no response.
However, if there is an upgrade, the response is like long, ending with something like this:
... Removing obsolete file /usr/lib/libupm-t3311.so.0.7.0. Removing obsolete file /usr/lib/libupm-si7005.so.0.7.0. Removing obsolete file /usr/lib/libupm-max31855.so.0.7.0. Removing obsolete file /usr/lib/libupm-mlx90614.so.0.7.0. Removing obsolete file /usr/lib/libupm-sx1276.so.0.7.0. Removing obsolete file /usr/lib/libupm-groveo2.so.0.7.0. Removing obsolete file /usr/lib/libupm-nrf8001.so.0.7.0. Removing obsolete file /usr/lib/libupm-mma7455.so.0.7.0. Removing obsolete file /usr/lib/libupm-sm130.so.0.7.0. Removing obsolete file /usr/lib/libupm-groveemg.so.0.7.0. Removing obsolete file /usr/lib/libupm-t6713.so.0.7.0. Removing obsolete file /usr/lib/libupm-groveultrasonic.so.0.7.0. Removing obsolete file /usr/lib/libupm-otp538u.so.0.7.0. upm (0.7.3) already installed on root. Configuring mraa. Configuring upm.
-
Install opkg libraries needed for specific projects, such as Numpy statistical functions, OpenCV computer vision, nano editor (instead of vim):
opkg install limraa0
opkg install python-numpy opencv python-opencv nanoThe response:
Collected errors: * opkg_install_cmd: Cannot install package limraa0.
For further info:
- http://iotdk.intel.com/docs/master/upm/node/
Temp sensor on shield
Let’s look at SeeedStudio’s wiki on the Temp sensor.
Note that the Voltage is “3.3 - 5V”.
To make use of sensors, we’ll need that shield from the Grove Kit. It’s designed so we don’t have to solder anything.
-
PROTIP: Make it a habit to discarge static before touching any electronics.
-
PROTIP: Disconnect power to the board before you insert the Grove shield on top of the Edison board.
The green LED should now be lit.
-
Use the 4-pin grove cable to connect the temperature sensor to port A0 on the Grove shield.
XDK new project
-
If you are using XDK, create a new project file.
-
Select Templates, Local Temperature, Continue.
-
Specify the project name as the folder name. OK.
Notice “Read Temperature Sensor and send temperature in degrees of Fahrenheit every 4 seconds”.
A console.log statement sends a reading “Analog Pin (A0) Output: “ and “Fahrenheit Temperature: “ + fahrenheit_temperature);
Edit program
-
If four seconds (4000) is too frequent a reporting period, change it to 30000 (30 seconds).
-
Click the download icon.
Debugging
-
Next, send the temperature value to a cloud for analysis and analytics.
Gateway
Intel’s Gateway hardware collects data from IoT devices on the edge for aggregation in cloud services.
Development Boards & Kits - x86 IOT Gateway (DK50) Internet of Things Price: $302.25 + $6.99 shipping
https://software.intel.com/en-us/node/633284
https://software.intel.com/en-us/iot/hardware/gateways
lists the Gateway at 64-bits.
It has a VGA monitor and keyboard ports.
It’s controlled by the Intel® IoT Gateway Software Suite.
The Gateway connects to the internet via a Ethernet cable. An Ethernet cable is also used to connect to the Intel System Studio IoT Edition or Intel XDK over SSH.
Readings:
-
https://shopiotmarketplace.com/iot/index.html#/home
-
https://www-ssl.intel.com/content/www/us/en/embedded/solutions/iot-gateway/overview.html
-
https://software.intel.com/en-us/getting-started-with-intel-iot-gateways-and-iotdk
Cloud services
Intel lists its cloud services affiliations at
https://software.intel.com/en-us/iot/cloud-analytics
-
Trusted Analytics Platform (TAP) open source platform for data scientists, based on Cloud Foundry.
Not on the list:
-
ATT M2X cloud
-
Ubidots has a demo that collects Temp data and displays it as a line graph.
-
Particle.io has a Cloud integrated with its IDE and devices. Partners with Microsoft.
-
Samsung’s ARTIK cloud has a demo on hackster.io
SAMI is platform agnostic. It takes data from any type of device - FitBit, smart lightbulb, connected washing machine, etc.
-
As for Google Compute Cloud, Agosto’s IoT connection broker is a component of and gateway into Google’s Pub/Sub service, as well as the company’s IoT (M2M) Accelerator
Predix
-
https://www.predix.io/resources/tutorials/journey.html?environment=workshop#1838
Predix Transform Workshops
Support Serial Numbers
For support, contact https://customercare.intel.com/?lang=en-US. For product, type in “Intel Edison” to select “Intel Edison Compute Module (IoT)”.
The form asks for the serial number from the tiny tag below the metal chip cover (such as “FZEDA 616D 01Q5B 501”).
This page shows how to get the serial number by placing the board in AP (Access Point) mode.
- On your board, hold down the button labeled PWR for 4 seconds (no more than 2 seconds but no longer than 7 seconds). The LED at JS2 near the center of the board should blink and remain blinking as long as your board is in AP mode.
This post offers an iotdk eclipse program to show programs to get the FPO number and ATPO number unique to each specific processor.
Social Media
@inteliot
#intelmaker
#iamintel
#intelnews
@IntelSoftware
#commercialiot with GE Predix
Events
https://iotroadshow.intel.com/home/ were in April 2016
Resources
https://www.wikiwand.com/en/Intel_Edison
https://www.youtube.com/watch?v=nUrxSjyhodU
http://www.codefoster.com/edison-setup/ using Visual Studio on Azure
https://software.intel.com/en-us/blackbelt “Blackbelt” is Intel’s developer certification program
https://www.edx.org/course/html5-introduction-w3cx-html5-0x-0 Learn how to build Web sites using HTML5 and basic CSS, directly from W3C, creator of the latest Web standards.
- Ebook: Exploring Edison - Meet Edison by Harry Fairhead (@Iprogrammerinfo)
Shawn Hymel at Sparkfun has great “Getting Started with Intel Edison” videos:
Interface types:
- GPIO = general purpose input/output
- SPI = Serial Peripheral Interface (full-duplex max speed is 25Mhz/4 ~6.25Mhz) “SPI exposed is also used for the ADC. Try not to use your own CS”
- I2C = Inter-integrated circuit designed by Philips in the early ’80s for easy (two-wire) communication (at 100kHz or 400kHz) between master and slave components residing on the same circuit board.
- AIO = All-in-One
- PWM = Pulse width modulation
Acronyms
From IoT and IIoT Acronyms:
- GPIO = General purpose input/output
- ADC = Analog to digital converter
- NUC = Next Unit of Computing, a barebone, small-form-factor personal computer designed by Intel.
- SPI exposed is also used for the ADC. Try not to use your own CS
- USB = Universal Service Bus
- RNDIS = Remote Network Driver Interface Specification is a Microsoft proprietary protocol used mostly on top of USB to provide a virtual Ethernet link to most versions of the Windows and Linux operating systems.
- BTLE = Bluetooth low energy
- ICSP = In-Circuit Serial Programming (ICSP), also called In-system programming (ISP) to reprogram the processor without removing it from the circuit, and without relying on the bootloader in the processor.
- OTG = On-The-Go, allows USB devices, such as digital audio players or mobile phones, to act as a host, allowing other USB devices, such as USB flash drives, digital cameras, mice or keyboards, to be attached to them.
- UPM = Useful Packages & Modules
- MRAA
- XDK = Intel’s name for its IDE
- LED = Light Emitting Diode
- MCU = Microcontroller unit
- DFU = Device Firmware Update
- CDC
Learning resources
https://app.pluralsight.com/library/courses/nodejs-internet-of-things-intel-edison/table-of-contents
https://www.youtube.com/watch?v=nUrxSjyhodU&t=3s Intel IoT Grove Starter Kit Part 1
https://www.youtube.com/watch?v=mTR3EDKVp9w Intel Edison Shell Access from Mac
More on IoT
This is one of a series on IoT:
-
IoT Acronymns and Abbreviations on Quizlet
- IoT Apprentice school curriculum
- IoT use cases
- IoT reminders prevent dead mobile battery
- IoT text to speech synthesis
- IoT AWS button
- Intel IoT
- IoT Raspberry hardware
- IoT Clouds
- Samsung IoT Cloud
NOTE: Pages about GE’s Predix have been removed.