How adithyabollu/zotcount works
Project type and purpose
• From the file tree and README, we see two halves:
• A PlatformIO-based embedded firmware project (“PlatformIo-Project/CS147 Final Project”) written in C++ (src/main.cpp, include/, lib/) with tests under test/
• A simple static website (Website/src/index.html, index.js, styles.css)
• Given the name “ZotCount,” this is very likely an IoT/counting device (a microcontroller that counts events) plus a browser-based dashboard to view those counts.
File structure
• PlatformIo project
• platformio.ini – board, framework, build settings
• / – public headers and configuration
• lib/ – helper libraries or hardware-abstraction layers
• src/ – application entry (main.cpp)
• test/ – unit/integration tests
• Website
• index.html – markup
• index.js – fetches count data, updates UI
• styles.css – presentation
Key insights from the README
• Although extremely brief, the naming convention (“ZotCount”) implies the embedded firmware reads/counts sensor inputs or events; the static site visualizes the live count via network calls.
Main components
a. Hardware layer
• Microcontroller board (e.g., ESP32/ESP8266 or Arduino)
• Attached sensors or input circuit (count trigger)
b. Firmware layer
• PlatformIO build system
• Source code modules
– main application loop (src/main.cpp)
– Hardware-Abstraction Library (lib/)
– Public APIs / configuration (include/)
• Test harness (test/)
c. Network/API layer
• HTTP/REST server running on the microcontroller
• JSON payloads (“{ count: 123 }”)
d. Front-end layer
• Static web assets (HTML, JS, CSS)
• Browser as the client
e. (Optional) Hosting/Deployment
• GitHub Pages or local file server for the Website directory
Relationships and data flow
• The microcontroller firmware polls the sensor → maintains an internal counter
• It exposes an HTTP endpoint (e.g., GET /count) on its network interface
• The browser loads index.html → index.js periodically or via WebSocket polls the microcontroller’s endpoint → receives JSON → updates the UI
Architectural patterns and design principles
• Edge computing: device does counting and serves data directly
• Client-server: browser (client) ↔ microcontroller (server)
• Layered separation in firmware: hardware abstraction (lib/) → business logic (src/) → public API (include/)
• Single-page application (SPA) style front-end for real-time UI updates
Final checklist
– Include any third-party dependencies (Framework: Arduino/ESP-IDF under platformio.ini)