Documents

An Easy Way to Control Your Arduino From Internet

Description
estudos Arduino
Categories
Published
of 6
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Share
Transcript
  http://www.instructables.com/id/An-easy-way-to-control-your-Arduino-from-Internet-/  Food   Living   Outside   Play   Technology   Workshop An easy way to control your Arduino from Internet :) by nearbus  on April 1, 2013 Table of Contents An easy way to control your Arduino from Internet :) ....................................................................................1 Intro: An easy way to control your Arduino from Internet :) ............................................................................2 Step 1: Sing up a new user ...................................................................................................2 Step 2: Define a New Device ..................................................................................................3 Step 3: Download and Install the NearAgent code library .............................................................................3 Step 4: Set the Agent's configuration ............................................................................................4 Step 5: Verify that your Arduino is UP ...........................................................................................4 Step 6: Wire your Arduino ....................................................................................................5 Step 7: Control the LED from the Cloud ..........................................................................................5 Step 8: Testing More Features ................................................................................................5 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'sworld). 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 transparentway. 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 itvia 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 beable to control it from your web browser. The NearBus Concept The NearBus system proposes a  different paradigm  to support a large deployment of simple controlled devices. Instead of the traditional concept of connect  aremote device to the cloud (to control it), the NearBus system   maps the device into the cloud  , doing a  mirroring  (or replication) of small part of the microcontroller's memory  into the cloud memory. Under this paradigm, reading or writing  on the Cloud's memory will have the same effect  as if you were reading orwriting directly into the microcontroller's memory, simplifying  the way in which the device is controlled.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 theremote 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 To implement this App Note you will need:- 1 Arduino Ethernet Board - 1 LED - 1  Current limiter Resistor  ( 330 Ohms or similar value)- 1 Ethernet Internet connection  (with a RJ45 cable)- Implementation time:  20 min - Difficulty Level:  Low Step 1: Sing up a new user a- Go to the SIGN UP  screen ( www.nearbus.net ) and set up a new user. Only the username  , email  and password  are required to setup your new account.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.- Device Name: optional (eg. My Device)- Location: nothing- Function: nothing- Shared Secret: Mandatory (length of 8). It is the same as you should configure in the Arduino (eg. 12345678)- Callback Function: nothing- Refresh Rate: nothing (default 1000ms)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 notconfuse 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. Step 3: Download and Install the NearAgent code library a- Download the Arduino NearBus library from the following link:Download Arduino Ethernet Agent 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 Cloudthrough the NearBIOS. Step 5: Verify that your Arduino is UP In the Device List screen, your Arduino should go Up (green) in a few seconds. 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.
Search
Tags
Related Search
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks
SAVE OUR EARTH

We need your sign to support Project to invent "SMART AND CONTROLLABLE REFLECTIVE BALLOONS" to cover the Sun and Save Our Earth.

More details...

Sign Now!

We are very appreciated for your Prompt Action!

x