This is the soul of the gadget I made for my son to help him to check the worth of his dollars. It connects to our wifi network, fetches the current exchange rate, multiply that with 50 (the amount of dollars he owns), and shows the result on a 8 digit 7-segment LED display.
- Some kind of ESP32 board
- MAX7219 controlled 8 digit, 7-segment LED display
- API key to APILayer.com
The program sends commands to the LED display through the SPI3 (also called VSPI) peripheral of ESP32. The wiring of the LED display in this case looks like this:
+-------------+
| | +--------------------------+
| 23|----------------|DIN |
| ESP32 18|----------------|CLK MAX7219 |
| 5|----------------|CS |
| | +--------------------------+
+-------------+
Get the code:
git clone [email protected]:kovagoz/esp32-dollar-exchange.git
cd esp32-dollar-exchange
git submodule update --init
Set up wifi SSID / password and the API key. Also set the stack size of main task to 8192 (Component config > ESP System Settings > Main task stack size).
make menuconfig
Then compile the project:
make
And finally upload the binaries to the esp board:
make install