This project was developed as part of the TECH 100 course, demonstrating the practical application of IoT technologies in public transportation. The system enables real-time tracking of public buses using ESP8266 microcontroller and GPS module integration.
- Real-time GPS tracking of bus locations
- Web-based interface for location visualization
- Google Maps integration for accurate mapping
- Responsive design for mobile and desktop viewing
- 5-second location update interval
- Modern UI with custom styling
- NodeMCU ESP8266 Development Board
- NEO-7M GPS Module
- Connecting wires
- USB cable for programming
- Power source (USB power bank recommended for mobility)
- ESP8266 Operating Voltage: 3.3V
- GPS Module Operating Voltage: 3.3V-5V
- Serial Communication: 9600 baud rate for GPS module
- WiFi: 2.4GHz IEEE 802.11 b/g/n
SoftwareSerial.h- For serial communication with GPS moduleTinyGPS++.h- For parsing GPS dataESP8266WiFi.h- For WiFi connectivity
- Arduino IDE
- Required Board Manager: ESP8266 Community Board Package
- GPS VCC → NodeMCU 3.3V
- GPS GND → NodeMCU GND
- GPS TX → NodeMCU D1 (GPIO 4)
- GPS RX → NodeMCU D2 (GPIO 5)
Refer to the wiring diagram in nodemcu-gps-wiring.png for visual guidance.
- Connect the GPS module to NodeMCU following the wiring instructions above
- Power up the NodeMCU using a USB cable or power bank
-
Install Arduino IDE
-
Add ESP8266 board support:
- Go to File → Preferences
- Add
http://arduino.esp8266.com/stable/package_esp8266com_index.jsonto Additional Board URLs - Go to Tools → Board → Boards Manager
- Search for and install "esp8266"
-
Install Required Libraries:
- Go to Sketch → Include Library → Manage Libraries
- Install "TinyGPS++" library
- ESP8266WiFi comes with the ESP8266 board package
- Open
public_bus_live_tracking_system.ino - Update WiFi credentials:
const char *ssid = "your_wifi_ssid"; const char *password = "your_wifi_password";
- Add your Google Maps API key:
String GMAP_API_KEY = "your_google_maps_api_key";
- Select appropriate board: Tools → Board → NodeMCU 1.0
- Select correct COM port
- Upload the code
- Power up the device
- Wait for WiFi connection (Serial monitor will display IP address)
- Open the displayed IP address in a web browser
- The map will show the current location with updates every 5 seconds
- ESP8266 handles WiFi connectivity and serves the web interface
- NEO-7M GPS module provides location data
- Serial communication between GPS and ESP8266
- Arduino framework for device programming
- TinyGPS++ for GPS data parsing
- ESP8266WebServer for serving web interface
- Google Maps API for location visualization
- Responsive HTML/CSS design
- JavaScript for map handling and updates
- Google Maps integration for location display
-
No GPS Fix
- Ensure clear view of sky
- Wait for GPS module to acquire satellites (can take 1-5 minutes)
- Check GPS module connections
-
WiFi Connection Issues
- Verify WiFi credentials
- Ensure WiFi network is in range
- Check Serial monitor for connection status
-
Map Not Loading
- Verify Google Maps API key
- Check browser console for errors
- Ensure device is connected to internet
- Multiple bus tracking support
- Route prediction
- Estimated arrival times
- Historical route data logging
- Mobile app development
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- TECH 100 course instructors and teaching assistants
- ESP8266 Community
- TinyGPS++ library developers
- Google Maps Platform
For any queries regarding this project, please open an issue in the repository.
This project was developed as part of the TECH 100 course curriculum.