Raspberry Pi + GSM Integration
In the second phase of development, we connected the vending system to a Raspberry Pi using serial communication to allow remote command execution. We also used GSM to notify the operator when ingredient levels were low.
Socket Server Implementation
import serial
import socket
ser = serial.Serial('/dev/USB0', 9600)
SERVER_SOCKET = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
SERVER_SOCKET.bind(('192.168.8.100', 8000))
SERVER_SOCKET.listen(1)
CONNECTION, CLIENT_ADDRESS = SERVER_SOCKET.accept()
...
Use Cases
- Notify operators when supply falls below a threshold
- Enable future remote commands (e.g., restock mode)
- Integrate a web dashboard using Raspberry Pi APIs
This integration paves the way for networked vending systems with predictive analytics, logging, and centralized control — all beginning from a simple vending prototype built with students in mind.