The following should be installed in your PC
- AVR-GCC
- AVRDUDE
- avr-libc
On Ubuntu or any Debian based Linux distro execute the following commands
sudo apt-get install -y gcc-avr
sudo apt-get install -y avrdude
sudo apt-get install avr-libc
- Open terminal in the atmega2560FW folder and execute
make clean
- Open makefile, replace P=COM1 to the COM port of your arduino mega and save the file
1. Compile it with
make all
- Upload it to your Arduino with
make program
You should have Arduino IDE Installed
-
Add ESP32 Board to your Arduino IDE 1. In your Arduino IDE, go to File> Preferences Installing ESP32 Add-on in Arduino IDE Windows, Mac OS X, Linux open preferences 2. Enter
https://dl.espressif.com/dl/package_esp32_index.json
into the “Additional Board Manager URLs” field then, click the “OK” button: Note: if you already have the ESP8266 boards URL, you can separate the URLs with a comma as follows:https://dl.espressif.com/dl/package_esp32_index.json, http://arduino.esp8266.com/stable/package_esp8266com_index.json
3. Open the Boards Manager. Go to Tools > Board > Boards Manager… 4. Search for ESP32 and press install button for the “ESP32 by Espressif Systems“: 5. That’s it. It should be installed after a few seconds. -
Now copy the contents of the libs folder to the libraries directory of your Arduino 1. If you are using windows, the libraries directory will be Documents/Arduino/libraries
-
Select ESP32 Dev Kit from Tools->Board->ESP32 Dev Kit
-
Select the correct port from Tools->Port
-
Then in ESP32FW.ino file, on line number 13 and 14, put your WiFi creds
-
Upload the Code to your ESP32
+ broker used is borker.hivemq.com
+ vending can be done by publishing an ammount to mdb/invoke topic
Note: for more details, you can see MQTTHandler.h file
Short Wire A and Wire B to start the MDB communication or put an on/off button
The parts used in this circuit are: