An interactive museum display system that uses Arduino-based hardware to detect physical objects and RFID cards, providing real-time web interface updates through Socket.IO.
This system combines physical hardware interaction with web-based display:
- Light sensors detect when visitors pick up museum objects
- RFID readers identify specific year range cards
- Web interface updates automatically based on hardware interactions
- Socket.IO provides real-time communication between Arduino and web clients
- Arduino Uno or Nano
- MFRC522 RFID module (SPI connection)
- 3x Light sensors (LDR/Photoresistor) for object detection
- RFID cards programmed with specific year ranges
- USB cable for Arduino connection
Based on arduino.ino:
- RFID Module: RST_PIN = 9, SS_PIN = 10 (SPI connection)
- Light Sensors:
- NAF sensor: Pin A0
- NAFSFA sensor: Pin A1
- EVOL sensor: Pin A2
pip install -r requirements.txt- Upload
arduino.inoto your Arduino - Verify serial communication at 9600 baud
- Test light sensors and RFID reader functionality
Update .env file with your Arduino's serial port:
SERIAL_PORT=/dev/cu.usbmodem1101 # macOS
# SERIAL_PORT=/dev/ttyUSB0 # Linux
# SERIAL_PORT=COM3 # Windows- Visitor picks up a physical object (naf, nafsfa, or evol)
- Light sensor detects the object removal (light level changes)
- Arduino sends
OBJECT_PICKED:objectnamevia serial - Web interface automatically navigates to section page
- With object picked, visitor places RFID card on reader
- Arduino identifies the card and maps it to a year range
- Arduino sends
YEAR_DETECTED:yearrange:objectnamevia serial - Web interface navigates to the year-specific content
- Visitor returns object to its original position
- Light sensors detect bright light (object replaced)
- Arduino sends
OBJECT_REMOVED:objectnamevia serial - Web interface returns to main page
naf- Nigerian Air Force Historynafsfa- Nigerian Air Force Special Forces Academyevol- Financial Evolution
Based on Arduino RFID configuration:
- 1962-1972
- 1973-1982
- 1983-1992
- 1993-2002
- 2003-2012
- 2013-2022
- 2023-2032
python main.pyThe system will:
- Attempt to connect to Arduino via serial port
- Start background thread for Arduino communication
- Launch web server on http://localhost:5550
- Display connection status and system information
- Main Interface: http://localhost:5550
- Section Pages: Automatically loaded based on object detection
- Year Details: Automatically loaded based on RFID detection
object_picked- Physical object was picked upyear_dropped- RFID card detected for specific yearobject_dropped- Physical object was returnedunknown_rfid- Unrecognized RFID card detectedarduino_ready- Arduino system initializedarduino_disconnected- Arduino connection lost
get_status- Request current system statusget_arduino_status- Check Arduino connectiontest_arduino_connection- Test/reconnect Arduino
- Check USB cable connection
- Verify serial port in
.envfile - Test Arduino IDE serial monitor at 9600 baud
- Check Arduino sketch upload was successful
- Verify sensor wiring to analog pins A0, A1, A2
- Check light thresholds in Arduino code
- Test sensor values via serial monitor
- Verify SPI wiring (RST=9, SS=10)
- Check RFID card UIDs match Arduino mapping
- Test RFID detection via serial monitor
The system is designed for production use with real Arduino hardware. All simulation code has been removed in favor of proper hardware integration. For testing without hardware, you would need to modify the Arduino communication code or use a hardware simulator.