Hi,
Have a look at my project, measuring tank level remotely using 3G arduino and scada:
Thanks
Hi,
Have a look at my project, measuring tank level remotely using 3G arduino and scada:
Thanks
Very good if it works - How does it work ?What sensors
What code do u run please
It does work for the past 3 month already.
Using ultrasonic sensor, I can't remember the brand I could check tomorrow at office as currently I am at home.
I am using the web server code, where it send to a php server every 5 minute, the php then updated into mysql. I could paste the code here tomorrow as it is in my office pc.
#include <Ethernet.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192, 168, 1, 2 };
byte gw[] = {192,168,1,1};
byte server[] = { XXX, XX, XXX, XXX }; // My webpage IP
byte subnet[] = { 255, 255, 255, 0 };
int level = 0;
int tempPin = 2;
int ledPin = 10;
void setup()
{
pinMode(tempPin, INPUT);
}
void loop()
{
delay(3000);
senddata();
}
void senddata()
{
level = analogRead(tempPin); //Read analogue value
Ethernet.begin(mac, ip, gw, subnet);
Client client(server, 80);
Serial.println();
Serial.println("Initiates connection…");
Serial.println("Connecting…");
delay(1000); //This one keeps it from hanging
if (client.connect()) {
Serial.println("Connected!");
client.print("GET http://xxxx/PHPFile.php?level=");
client.print(level);
client.println(" HTTP/1.1");
client.println("Host: www.xxxx");
client.println();
}
else
{
Serial.println("Connection failed");
}
//}
//stop client
client.stop();
while(client.status() != 0)
{
delay(5);
}
}