Sensor Data Channel Feed: | JSON XML CSV |
Field 1 Data: Battery | JSON XML CSV |
Field 2 Data: Soil Moisture Sensor T1 | JSON XML CSV |
Field 3 Data: Soil Moisture Sensor T2 | JSON XML CSV |
Field 4 Data: Soil Moisture Sensor T3 | JSON XML CSV |
Field 5 Data: Soil Moisture Sensor T4 | JSON XML CSV |
Field 6 Data: Soil Moisture Sensor T3-1 | JSON XML CSV |
Field 7 Data: Test 6 | JSON XML CSV |
Field 8 Data: Test 7 | JSON XML CSV |
<iframe width="450" height="260" style="border: 1px solid #cccccc;" src="https://thingspeak.com/apps/plugins/5732"></iframe>
<iframe width="450" height="260" style="border: 1px solid #cccccc;" src="https://thingspeak.com/apps/matlab_visualizations/35407"></iframe>
<iframe width="450" height="260" style="border: 1px solid #cccccc;" src="https://thingspeak.com/channels/18294/charts/2?dynamic=true&results=100&title=Soil+Moisture+%28T1%29&type=spline&yaxis=Millivolt+Output+%28mV%29&yaxismax=2100&yaxismin=1500"></iframe>
Title: | |
X-Axis: | |
Y-Axis: | |
Color: | |
Background: | |
Type: | |
Dynamic?: | |
Days: | |
Results: |
Timescale: | |
Average: | |
Median: | |
Sum: | |
Rounding: | |
Data Min: | |
Data Max: | |
Y-Axis Min: | |
Y-Axis Max: |
<iframe width="450" height="260" style="border: 1px solid #cccccc;" src="https://thingspeak.com/channels/18294/charts/3?dynamic=true&results=100&title=Soil+Moisture+%28T2%29&type=spline&yaxis=Millivolt+Output+%28mV%29&yaxismax=2100&yaxismin=1500"></iframe>
Title: | |
X-Axis: | |
Y-Axis: | |
Color: | |
Background: | |
Type: | |
Dynamic?: | |
Days: | |
Results: |
Timescale: | |
Average: | |
Median: | |
Sum: | |
Rounding: | |
Data Min: | |
Data Max: | |
Y-Axis Min: | |
Y-Axis Max: |
<iframe width="450" height="260" style="border: 1px solid #cccccc;" src="https://thingspeak.com/channels/18294/charts/4?dynamic=true&results=1000&title=Soil+Moisture+%28T3%29&type=spline&yaxis=Millivolt+Output+%28mV%29&yaxismax=2100&yaxismin=1000"></iframe>
Title: | |
X-Axis: | |
Y-Axis: | |
Color: | |
Background: | |
Type: | |
Dynamic?: | |
Days: | |
Results: |
Timescale: | |
Average: | |
Median: | |
Sum: | |
Rounding: | |
Data Min: | |
Data Max: | |
Y-Axis Min: | |
Y-Axis Max: |
<iframe width="450" height="260" style="border: 1px solid #cccccc;" src="https://thingspeak.com/channels/18294/charts/5?dynamic=true&results=100&title=Soil+Moisture+%28T4%29&type=spline&yaxis=Millivolt+Output+%28mV%29&yaxismax=2100&yaxismin=1500"></iframe>
Title: | |
X-Axis: | |
Y-Axis: | |
Color: | |
Background: | |
Type: | |
Dynamic?: | |
Days: | |
Results: |
Timescale: | |
Average: | |
Median: | |
Sum: | |
Rounding: | |
Data Min: | |
Data Max: | |
Y-Axis Min: | |
Y-Axis Max: |
<iframe width="450" height="260" style="border: 1px solid #cccccc;" src="https://thingspeak.com/channels/18294/charts/6?dynamic=true&results=100&title=Soil+Moisture+%28T3%29&type=spline&yaxis=Millivolt+Output+%28mV%29&yaxismax=2100&yaxismin=1200"></iframe>
Title: | |
X-Axis: | |
Y-Axis: | |
Color: | |
Background: | |
Type: | |
Dynamic?: | |
Days: | |
Results: |
Timescale: | |
Average: | |
Median: | |
Sum: | |
Rounding: | |
Data Min: | |
Data Max: | |
Y-Axis Min: | |
Y-Axis Max: |
Community |
Documentation |
Tutorials |
Terms |
Privacy Policy
© 2019 The MathWorks, Inc.
http://www.decagon.com/en/soils/volumetric-water-content-sensors/10hs-large-volume-vwc/
thanks
And this is the code am using:
#include
#include
SoftwareSerial mySerial(9, 10);
int sensor_pin= A0;
int output_value;
void setup() {
mySerial.begin(9600); // the GPRS baud rate
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
Serial.println("reading from the sensor");
delay(2000);
}
// the loop routine runs over and over again forever:
void loop() {
output_value=analogRead(sensor_pin);
output_value=map(output_value,1023,0,0,100);
Serial.print("Moisture:");
Serial.print(output_value);
Serial.println("%");
delay(1000); // delay in between reads for stability
Send2Pachube();
if (mySerial.available())
Serial.write(mySerial.read());
}
void Send2Pachube()
{
mySerial.println("AT");
delay(500);
mySerial.println("AT+CREG?");
delay(500);
mySerial.println("AT+CGATT=1");
delay(500);
mySerial.println("AT+CIPSHUT");
delay(500);
mySerial.println("AT+CIPSTATUS");
delay(500);
mySerial.println("AT+CIPMUX=0");
delay(1000);
ShowSerialData();
mySerial.println("AT+CSTT=\"airtelgprs.com\","",""");//start task and setting the APN,
delay(500);
ShowSerialData();
mySerial.println("AT+CIICR");//bring up wireless connection
delay(1500);
ShowSerialData();
mySerial.println("AT+CIFSR");//get local IP adress
delay(1000);
ShowSerialData();
mySerial.println("AT+CIPSPRT=0");
delay(1500);
ShowSerialData();
mySerial.println("AT+CIPSTART=\"TCP\",\"184.106.153.149\",\"80\"");//start up the connection
delay(3000);
ShowSerialData();
mySerial.println("AT+CIPSEND");//begin send data to remote server, might have to add =44
delay(2000);
ShowSerialData();
String str="GET https://api.thingspeak.com/update?api_key=BB4SNJ9GZNGJWKKS&field1=" + String(output_value);
mySerial.println(str);//begin send data to remote server
delay(2000);
ShowSerialData();
mySerial.println((char)26);//sending
delay(2500);//waitting for reply, important! the time is base on the condition of internet
mySerial.println();
ShowSerialData();
mySerial.println("AT+CIPSHUT");//close the connection
delay(100);
ShowSerialData();
}
void ShowSerialData()
{
while(mySerial.available()!=0)
Serial.write(mySerial.read());
}
But the At+CIPSEND command doesn't work, can you please help me out with it!!
softwareSerial.h
String.h