A car that can be remote-controlled via a web interface using MQTT.
cd aedes-broker-mqtt
npm install
cd aedes-broker-mqtt
node broker.js
Open index.html
in your preferred browser.
You control the car using W
, A
, S
& D
.
To configure the application to work for your needs you need to change the following files:
- In
index.html
change thehost
to the IP address of the broker.- If you want to change MQTT port: In
broker.js
change theport
to the port you want to use. And also changeport
to the corresponding port inindex.html
- If you want to change MQTT port: In
- In
main.cpp
change WiFi SSID and password to your needs. Also, change the broker IP and port in the PubSubClient setup.
-
Issue 1: The car doesn't respond to control commands.
- Solution: It can depend on many things.
Make sure the car is connected to the MQTT broker and the MQTT messages are being received correctly. Check the broker logs and verify the connection settings in
index.html
. Also, check the Config section inmain.cpp
.
- Solution: It can depend on many things.
Make sure the car is connected to the MQTT broker and the MQTT messages are being received correctly. Check the broker logs and verify the connection settings in
-
Issue 2: The car moves in the wrong direction when using the controls.
- Solution: Change the
reversedMotor
variable inmain.cpp
totrue
orfalse
depending on your needs. Alternatively just change the wiring of the motor.
- Solution: Change the