This is my first post in forum.
I want to introduce a program called “ArduinoWing” that was developed by Implit Co., Ltd. ArduinoWing is a kind of communication bridge program for Arduino…
The PC that is running ArduinoWing act as a kind of RESTful API server of KVT(Key Value Table) that is announced from the Arduino sketch… The PC and Arduino is connected by USB cable that same cable used to upload sketch to the Arduino board.
AruidnoWing provides RESTful API service of the key/value pair of the data(KVT) announced from Arduino sketch (with very simple ArduinoWing API function). And also provides control mechanism to the Arduino sketch by callback function with key/value pair parameter.
It can be easily implemented to control and view data of Arduino by simply adding ArduinoWing API into existing Arduino sketch.
Following is simple example about how to monitor temperature and humidity value and control LED of Arduino using internet browser.
- download attached ArduinoWing sketch source
#define DHT11_PIN 2
#define LED_PIN 8
// pass callback function
pinMode (LED_PIN, OUTPUT);
int chk = DHT.read11(DHT11_PIN); // READ DATA
send key/value pair using put function,
you can view key/value pair through the RESTful API
humidity = String(DHT.humidity);
Serial.println(“temperature\t” + humidity);
temperature = String(DHT.temperature);
Serial.println(“temperature\t” + temperature);
Serial.println(“Time out error,\t”);
arduinoWing.loop(); // receive control request
This callback function will be called when ArduinoWing accepts control request.
In this example, if key is led and value is 0, turn off led
or turn on led
void callBack(char *key, char *value)
if (strcmp(key, “led”) == 0)
digitalWrite(LED_PIN,strcmp(value, “0”) == 0 ? LOW : HIGH);
Serial.print(“led\t” + String(value));
// not defined Key
- import ArduinoWing library and compile above sketch
void put(String key, String value)
Announce key/value to ArduinoWing, This key/value pair can be shown using RESTful API(also can be see the key/value using internet browser)
ArduinoWing heart beat function, this function must be called periodically.
5. Next, type http port to use to connect http server. If you want to http authorization, type id, pw. Select your Arduino port. Click Start
- connect http://[your IP]:[port] using internet browser to ArduinoWing.
7. Key list
This menu can view list of keys announced from Arduino sketch using “put” function of ArduinoWing
8. Key Value
This menu can view value of selected key item, can select last value or value history.
9. This menu provides Arduino sketch control mechanism. When you click “Send” button, the ArduinoWing callback function will be invoked with the key/value specified.
In this example, select led, set value to 0 and click Send, you will see turn off LED.
The context of “Serial.print” function will display on the ArduinoWing application’s log window.
ArduinoWing use same USB serial port as Arduino IDE. So, when ArduinoWing is started, the USB serial port is under control of ArduinoWing. To use Arduino IDE to upload sketch, you must stop ArduinoWing.
Also, you can get ArduinoWing Client application for android here [Download link] or search “ArduinoWing” in google play store
arduinowing_dht_led.ino (1.68 KB)
ArduinoWing_0.0.1.zip (10.9 KB)