Arduino Control via a Web Service with Teleduino

Convert your Arduino into a sofisticated web control platform using Teleduino.

Teleduino is both a product and a service. Once the Teleduino sketch has been loaded on your Arduino (the ‘product’), it then connects to the Teleduino server awaiting your instruction from anywhere in the world via the internet (the ‘service’).

Typically there are no firewall changes required, and if your network supports DHCP then no network configuration is needed on the device. Easy!

The Teleduino platform allows you to perform the following with your Arduino, all via the internet:

  • Reset, ping, get version, get uptime, get free memory.
  • Define pin modes, set digital outputs, set analog outputs, read digital inputs, read analog inputs, or read all inputs with a single API call.
  • Define up to 2 ‘banks’ (4 for the Mega) of shift registers. Each ‘bank’ can contain up to 32 cascaded shift registers, giving a total of 512 digital outputs (1024 for the Mega).
  • Shift register outputs can be set, or merged, and expire times can be set on merges (you could set an output(s) high for X number of milliseconds).
  • Define, and read and write from serial port (4 for the Mega).
  • Read and write from EEPROM.
  • Define and position up to 6 servos (48 for the Mega).
  • Set preset values for the above functions, which get set during boot. Preset values are stored in the first 178 bytes of the EEPROM (413 for the Mega).

Arduino Control via a Web Service with Teleduino
Just imagine what you can do. The possibilities are endless. What makes it even better? The process is quick and easy.

This tutorial will guide you through creating a Status LED for your device, then obtaining and uploading the Teleduino library/sketch to your ethernet enabled Arduino Uno (or equivalent).

To complete this tutorial you need:

  • Arduino Uno / Mega (or equivalent)
  • Ethernet Sheild (Wiznet based)
  • LED
  • 1K Resistor (or similar)

This is our first tutorial and will be adding neat project tutorials for achieving specific tasks.

If you get stuck on any of the steps, or if you feel that there is a step that could be explained better, please leave a comment so that we can improve things.

Enjoy!

 

Step 1: Obtain Unique API Key

In order to uniquely identify your device on the Teleduino server, you need to obtain a unique API key.

This API key needs to be loaded into the Arduino sketch (explained in Step 4).

Your key will be sent to you by email within a few minutes of being requested.

To request a key, hop over to https://www.teleduino.org/tools/request_key.php (please bear with us while the nice looking site is being built!)

Cheers!

While your Teleduino device is booting, it flashes codes out the Status LED. This is so that you can keep an eye on what’s happening, and it also makes troubleshooting easier if you’re having trouble getting connected.

The different status codes are:
1 flash – Initialising
2 flashes – Starting network
3 flashes – Connecting to server
4 flashes – Authenticated
5 flashes – Session already exists for supplied key (sometimes happens after a quick restart – will work on next auto-restart)
6 flashes – Invalid or unauthorised key
10 flashes – Connection dropped


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top