Wifi shield (Fi250)is a economic internet solution with Arduino. The Wi-Fi module support IEEE 802.11b/g/n mode, maximum speed up to 65Mbit/s. Wifi shield (Fi250) combine on board antenna; it’s easy to build you project in a small box. The module reserve a UFL connector, you can use an extra antenna to improve the signal range. There is a key on the board, just push one time to change wifi shield as AP mode. The module have a computer interface software, you can control and upgrade the module via USB-UART convertor. The wifi shield contain a Micro SD card socket, it’s like a recorder when wifi shield working as TCP, UDP server.

Requirements

Setup

  1. Download the UbidotsWizFi250 library here
  2. Go to the Arduino IDE, click on Sketch -> Include Library -> Add .ZIP Library
  3. Select the .ZIP file of UbidotsWizFi250 and then “Accept” or “Choose”
  4. Close the Arduino IDE and open it again.

To use this library, put your Ubidots token and variable ID where indicated, as well as the WiFi settings. After uploading each example to your Arduino, open the Serial monitor to check the results. If no response is seen, try unplugging your Arduino and then plugging it again. Make sure the baud rate of the Serial monitor is set to the same one specified in your code.

Send values to Ubidots

To send multiple values to Ubidots, go to Sketch -> Examples -> Ubidots UbidotsWizFi250 and select the “saveValues” example.

#include "UbidotsWizFi250.h"
#define WLAN_SSID       "OpenWRT"  // Your WiFi SSID, cannot be longer than 32 characters!
#define WLAN_PASS       "Your_pass_here"  // Replace it with your WiFi pass
// Security can be OPEN, WEP, WPA, WPAAES, WPA2AES, WPA2TKIP, WPA2
#define WLAN_SECURITY   WEP

#define TOKEN "Your_token_here"  // Replace it with your Ubidots token
#define VARLABEL_1 "Your_variable_label_here" // Replace it with your Ubidots' variable ID
#define VARLABEL_2 "Your_variable_label_here" // Replace it with your Ubidots' variable ID
#define VARLABEL_3 "Your_variable_label_here" // Replace it with your Ubidots' variable ID

Ubidots client(TOKEN);

void setup() {
  Serial.begin(115200);
  while(!client.wifiConnection(WLAN_SSID, WLAN_PASS, WLAN_SECURITY));

}

void loop() {
  float value = analogRead(A0);
  float value2 = analogRead(A1);
  float value3 = analogRead(A2);
  client.add(VARLABEL_1,value);
  client.add(VARLABEL_2,value2);
  client.add(VARLABEL_3,value3);
  client.sendAll();
}

This module have some problems with SoftwareSerial library for this reason is impossible to implement a getValue function.

Did this answer your question?