This project is that we are making a sensor that can detect a wheelchair. Upon detection, the app will be notified and show how many wheelchair seats are available or unavailable on the bus.
Details
This model will be used to fit an Olympia City Bus. It will detect when the hook needed to secure the wheelchair is gone. Then after that point it will tell the app allowing others to see this.
Files
WheelchairSensor (2).aia
Here is the file to access our app. This works with MIT App Inventor and import it to use it. It should connect to our code allowing you to see how many seats are available by connecting to the magnetic sensor on our prototype.
Update on our project! Right now we have all the code written and will post it shortly. Today our teacher got us access to a bus and we were able to view it. We now know where we are going to place our sensor and pictures will also be posted regarding that.
Thank you for following our project and any feedback, questions, or help is very much appreciated.
Right now we have a lot of the bases of the code working. Recently, we have been working on Tinkercad and making a 3D printed design model to show to others. We are also working on the app via MIT app inventor.
If anyone has any ideas or can help us in anyway we would be open to that.
Just wanted to let everyone know we have chosen a pressure sensor as our sensor! We will connect it to the I2C on our Adafruit. If anyone can offer any suggestions or feedback, we would love that.
// Domain Name with full URL Path for HTTP POST Request const char* serverName = "http://api.thingspeak.com/update"; // Service API Key String apiKey = "THE_API_KEY";
unsigned long lastTime = 0; // Timer set to 15 seconds (15000) unsigned long timerDelay = 15000;
// State of the sensor int state = 0;
void setup() { Serial.begin(115200);
pinMode(13, INPUT_PULLUP);
WiFi.begin(ssid, password); Serial.println("Connecting"); while(WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(""); Serial.print("Connected to WiFi network with IP Address: "); Serial.println(WiFi.localIP());
Serial.println("Timer set to 15 seconds (timerDelay variable), it will take 15 seconds before publishing the first reading."); }
void loop() { //Send an HTTP POST request every 15 seconds if ((millis() - lastTime) > timerDelay) { //Check WiFi connection status if(WiFi.status()== WL_CONNECTED){ WiFiClient client; HTTPClient http;
// Domain name with URL path or IP address with path http.begin(client, serverName);
// Data to send with HTTP POST state = digitalRead(13); // Change the "&field1" to POST to other fields String httpRequestData = "api_key=" + apiKey + "&field1=" + String(state); // Send HTTP POST request int httpResponseCode = http.POST(httpRequestData);
/* // If you need an HTTP request with a content type: application/json, use the following: http.addHeader("Content-Type", "application/json"); // JSON data to send with HTTP POST String httpRequestData = "{\"api_key\":\"" + apiKey + "\",\"field1\":\"" + String(random(40)) + "\"}"; // Send HTTP POST request int httpResponseCode = http.POST(httpRequestData);*/