This code sets up an Arduino-based system that connects to the internet and communicates with a MQTT broker. It listens for RFID tags and button presses, and sends data to the broker when it detects an event. The system controls a servo and has a keypad with 30 buttons arranged in a 15x2. Overall, the device monitors the availability of the computers and reports the status to the server.
The device can be configured via the serial interface. The following commands are supported:
WIFI_SSID
- SSID of the Wi-Fi network to connect toWIFI_PASS
- password for the Wi-Fi network to connect toMQTT_USER
- username for the MQTT brokerMQTT_PASS
- password for the MQTT brokerMQTT_HOST
- hostname or IP address of the MQTT brokerMQTT_PORT
- port of the MQTT brokerMQTT_CLIENT_ID
- client ID for the MQTT connectionUSE_SSL
- whether to use SSL for the MQTT connectionUSE_UNSAFE_POINTER_CAST
- whether to use unsafe pointer casts for the struct iterationARDUINO_STREAM_TOPIC
- topic to publish the Arduino stream toARDUINO_WILL_TOPIC
- topic to publish the Arduino will toSERVER_STREAM_TOPIC
- topic to publish the server stream toSERVER_WILL_TOPIC
- topic to publish the server will to
The device uses the following hardware:
- Arduino Nano 33 IoT with WiFiNINA module
- RDM6300 RFID reader
- 30x push buttons
- 1x LED (built-in to the Arduino Nano 33 IoT)
The device schematics can be viewed in the schematics directory.
The following libraries are used: