Where is a available Toilet??!!
There are always public toilets on the streets. But we don't always find an avaliable one. It is even harder for us to get to one in those bad situations! That’s why we built the ToiletGo, a web app help people deal with this situation. ToiletGo tells people where the nearest available toilet is with real-time update, including detailed avaliable spaces and route support.
How we built it
The hardware system is built by Arduino develop board NanoMCU 1.0 (ESP8266). It combinates one PIR motion sensor and several ultrasonic sensors for each space to detect if any toilet space is occupied or not. The PIR motion sensor will first trigger when someone gets into the restroom. Then it awakes the ultrasonic sensors located in each spot, and find out if any of these are occupied. If there is any change occured in toilet occupancy, the system will send signal to the server through WiFi. The signal will be translated into JSON format and update the online database. The web application will automatically renew the information about the availability of toilet spots to users checking online. We used Google Firebase as our online database deployed on Amazon EC2, which we can construct real time data communication. The server is built based on RESTful API and Spring Framework. The web page automatically renews spot avaliability in real-time, and shows geographical position using Google Maps API, to show location of both user and nearest spots.
Challenges we ran into
Since we usually work with the AVRGCC and TI chips, we are not that familiar with the Arduino based embedded system, expecially the for un-official board like NanoMCU. It takes us time to get used to chip ESP8266's special pin mode. We also learned to use Spring Framework from scratch to finally buildng a server.
Accomplishments that we're proud of
Finally the whole system works! The hardware could successfully detect occupation in a smart way and then send back the information to the web database. The web client could also see the update of occupation directly in the web page in real time!
What we learned
We have learned how let board connect with internet through WiFi and how to deal with different type of protocol.
What's next for ToiletGo
We will try to make a mobile based App! In this way, the transition between the finding part and the navigation part could become smoother. For the web version, we want to try on more features of Google Maps API to bring more interaction between the list and map.