This is my first post and I am new to arduino. I am working on a class project where we are trying to setup a parking garage monitoring system. I have attached two photoelectric sensors to my arduino board and I have them recognized in a sketch. As one sensor is tripped it will display "car entered" and when the other is tripped it will display "car exit". I am trying to send an HTTP Post request from my arduino (with a wifi shield) to a server where it is being entered into a database and eventually sent to a website that other groups in the class are setting up.

Unfortunately I am relatively unexperienced in the programming world and I have no idea where to begin for this process. I will include my sketch from the sensors but I need to be able to send a packet to the "database team". The packet needs to include a Location ID(arbitrary name that I can make up), a count of cars (+1 for enter, -1 for exit), and a flag field (optional). If someone could please help me out that would be greatly appreciated. The location of the server is http://IP-Address-of-server/sensors/event.php

// turn the ledPin on digitalWrite(ledPin, HIGH); // stop the program for <sensorValue> milliseconds: //delay(sensorValue); // turn the ledPin off: digitalWrite(ledPin, LOW); // stop the program for for <sensorValue> milliseconds: delay(sensorValue);}

do { if(sensorValue > 155 || sensorValue < 140) { Serial.println("off"); break; } delay(100); i++; if(i==10) { Serial.println("car entered"); i=0; break; } } while(1); This needs some serious restructuring. Almost any time a do/while loop is used like this, it is a clear indication that the programmer doesn't know what he/she is doing. The sensorValue variable's contents can not change in the do/while loop, so it's initial value will determine when, or if, the loop ever ends, meaning that the loop will execute once or infinitely. This is almost certainly NOT what you want. The infinite part, at least.