Global IoT Dashboards: SmarTrash Cloud Games
An automated trash can that just opens its lid is extremely basic. The SmarTrash Cloud Games project transforms a boring household appliance into a global, gamified, internet-connected arcade machine. By combining the massive IoT capabilities of the ESP8266 Wi-Fi architecture with HC-SR04 sonar detection, the bin calculates exactly how many times it was used and violently blasts those statistics up into the Arduino Cloud!

Over-The-Air Variables (Arduino IoT Cloud)
This project requires fully abandoning standard 16x2 LCD screens and ascending to the Azure/AWS backed Arduino IoT Cloud.
- In the Web Dashboard matrix, the programmer creates an integer variable:
trashesThrown. - This variable is marked as
READ/WRITEand completely syncs to the physical silicon chip via securethingProperties.hWebSockets! - The Sensor Event Trap: The physical HC-SR04 ultrasonic array pings locally.
if (distance < 15 && lidIsClosed == true) {
openServoLid();
trashesThrown++; // Increment the global counter variable!
// The moment the variable changes locally, the Cloud library silently
// establishes a massive TCP/IP packet transmission and fires it to the global server!
}
The Webhook API Leaderboard Structure
Because the trashesThrown variable is pushed to the global server, you can attach an API "Webhook" inside the Arduino Cloud.
- Every time the variable increments, the Cloud automatically fires an HTTP POST payload over into a massive Google Sheets Script or an external Discord Bot API Server!
- The Discord bot intercepts the JSON string
{"trashesThrown": 42}and instantly posts in a public chat server:@User1 just leveled up their Sanitation Score to Rank 4! - The physical user gets visual feedback when the bin flashes massive Neopixels (Green for points, Rainbow for a level up!).
The Hyper-Connected Sanitation Kit
- NodeMCU ESP8266, ESP32, or Arduino Nano 33 IoT (Native Wi-Fi chip integration is mandatory. Bluetooth cannot reach Azure servers!).
- HC-SR04 Ultrasonic Sonar Component.
- Heavy Duty MG996R Metal Servos (To throw open the massive bucket lid thousands of times without failing).
- An active Arduino IoT Cloud Account.