For my project I'll be using the Intel Edison with the SparkFun Base Block, ADC Block and the GPIO block.
The Edison is a very powerful ultra-small computing platform with a range of cutting-edge software solutions. In this project we will create a simple smart light that will be controlled via a web page using the Edison. Let's begin! First we install Putty on our computer. Once we're finished the installation, we open Putty, and in the configuration we select Serial for the Connection Type. Replace COM6 with the USB Serial Port we are using, for the Speed we type in 115200.
Now once you enter the terminal program hit enter and you'll be prompted with a login, type "root" to login.
Before we get started with the programming part we have to configure the Edison first. In the terminal program type in "configure_edison --setup
" there you'll be prompted to enter a password, device name, setup WiFi. From now on whenever we want to access a WiFi point we simply type in "configure_edison --wifi
" in the terminal program and follow the steps provided. Now for the fun stuff, first we connect the components as depicted in the Fritzing schematic.
After we're done with that we head to Intel IOT developer site to download Intel XDK IOT Edition. It's the software we will be using to program our Edison. Once we're done with the installation, it's time to bring the Edison into our web connected world. When we're in the development environment of Intel XDK, we create a new program and look for a file called package.json; there we change the code with the following:
{
"name": "blankapp",
"description": "",
"version": "0.0.0",
"main": "main.js",
"engines": {
"node": ">=0.10.0"
},
"dependencies": {
"socket.io": "1.3.7"
}
}
Once were done we go back to main.js and type in the code I've provided. When we're done with the coding part we open up a web page and type in http://<Edison's IP address>:4242
where Edison IP address is the address you got when you logged on to the network with your Edison. When you hit enter you should see this on your web page.
Here is a short video of the LED being turned on from the toggle button on the web page.
Comments