An Easy Way To Control Your Arduino From Internet
An Easy Way To Control Your Arduino From Internet
An Easy Way To Control Your Arduino From Internet
Table of Contents
Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
http://www.instructables.com/id/An-easy-way-to-control-your-Arduino-from-Internet-/
Intro: An easy way to control your Arduino from Internet :)
This instructive describes step by step how to configure an Arduino Ethernet board tocontrol a LED from the Cloud, (the "Hello World" example in the microcontroller's
world). This trivial example is intended to introduce you the way how the NearBus connector works.
NearBus is a Cloud Connector that allows you to fully integrate in the cloud different MCU platforms (like Arduino, OpenPicus, etc.) in a very easy and transparent
way. Installing a light agent (the NearAgent) in your MCU hardware the NearBus system will allow you to see the MCU as a real extension of the cloud, controlling it
via the NearAPI (a very simple set of Web Services API functions).
There is no PC or gatewa y involved in this implementation. The Arduino will connect directly to the NearHub server through the internet access router and you will be
able to control it from your web browser.
This mirroring process between the Microcontroller's memory and the Cloud memory is called the MemoryMap process, so under the NearBus paradigm we say that the
remote device more than "connected" to the Cloud will be "Mapped" into the Cloud.
Although this instructive only show how to control a LED, the NearBus system offers all the MCU's features (like ADC, PWM, etc).
Required Components
b- Then, login into the NearBus website using your new user and password.
http://www.instructables.com/id/An-easy-way-to-control-your-Arduino-from-Internet-/
Step 2: Define a New Device
From the top menu bar select the NEW DEVICE option to create a new device.
To setup the new device you should configure the followings field in order to define it. Take in account that only the SHARED SECRET field is mandatory (the password).
The other fields are optional, so it is not necessary configure they for this first example.
Note: When you create a new device, the NearBus system will generate a unique device ID (likeNB1xxxxx) that will be showed in the DEVICE LIST screen (do not
confuse it with the DEVICE NAME field !!).
Take in account that you will need to configure this ID in the Arduino's code as explained in the following step.
Note: This code only include a simple implementation of the NearBIOS features in order to simplify its understanding.
b- Upload it to the Arduino Ethernet board, you only have to unzip the file and copy it into the Arduino library folder (remember to restart the Arduino IDE).
c- Load the "Hello World" code from the example section in the IDE menu.
http://www.instructables.com/id/An-easy-way-to-control-your-Arduino-from-Internet-/
Step 4: Set the Agent's configuration
a- Change the configuration settings in the Arduino main code, as showed in the next picture:
- Device_ID: Unique device identifier generated by the system (you can find it in the Device List screen).
- Password: User generated (shared secret).
- Arduino Ethernet MAC: Ethernet MAC Address (you can find it printed in the Arduino Ethernet board).
b- Compile and upload the code "Hello World" to the Arduino Ethernet board.
Important: Because in this example the Arduino will work in VMCU mode, you will not need modify the Arduino's code. The Arduino will be controlled from the Cloud
through the NearBIOS.
Important: The screen does not refresh in an automatic way, so you should reload it in order to get the device status.
Troubleshooting :(
If your Arduino remains DOWN, make the following verifications:
1- Verify that the green light in the Arduino's Ethernet connector is flashing.
2- Verify that your internet connection if Up (if you can surf by internet).
3- Verify that your Arduino is configured Ok (the 8 character password, the Device_ID and the Arduino's MAC).
4- Reset the Arduino, to ensure that it is properly initialized.
http://www.instructables.com/id/An-easy-way-to-control-your-Arduino-from-Internet-/
Step 6: Wire your Arduino
Wire a LED with a current limiter resistor to the Arduino's Pin 3 (NearBus Channel 0).
b- Put the Channel 0 in Manual Mode (check de MAN check-box for Channel 0).
c- Control your LED: Change the FUNCTION drop-down menu to UP, and the Arduino's Pin 3 should go UP and the LED will light :).
If you are interested in know more about this App Note please contact us at info@nearbus.net or visit www.nearbus.net
Related Instructables
http://www.instructables.com/id/An-easy-way-to-control-your-Arduino-from-Internet-/
Advertisements
http://www.instructables.com/id/An-easy-way-to-control-your-Arduino-from-Internet-/