Hello, I'm having a problem in displaying data received from IR Sensor into MIT App using WiFi connection. I'm planning to create a simple app that displays the status of a parking slot whether it is occupied or vacant on MIT app. When the IR Sensor detects a car, the status will turn Red (Not Available) whereas when the IR Sensor detects nothing, the status will turn Green (Available).
I really have no idea how to do it since this can be achieved normally using Bluetooth. I've attached the blocks that I've made so far which I believe have a lot of mistakes. Can someone help me? Thanks in advance.
It's through Wifi connection. Truth is I only have the code for Wifi connection + the IR sensor on Arduino IDE and I haven't done the MIT App code blocks part completely because I have no idea how to start on it.
void HTTP_handleRoot(void)
{
page = "<h1>Sensor to Node MCU Web Server</h1><h3>Data:</h3> <h4>"+String(data)+"</h4>";
server.send ( 200, "text/html", page );
delay(1);
}
but You did not see the response Sensor to Node MCU Web Server in a web browser?
That points to a setup problem in your Arduino code. (look for samples on this board.)
You send String(data) as your web response but you never modify the variable data from its boolean initialization value.
I advise getting decent web browser responses before trying to go further with AI2.