It is an arduino project using the TFT_eSPI library (which contains the Animated_Eyes_1 demo)
Clone this repository
git clone https://github.com/cheops/fri3dCamp_Badge2020_Animated_Eye
- In the Arduino IDE, go to File > Preferences > Additional board managers URLs:
- Add https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
Note: if you already have another boards URL, you can separate the URLs with a comma - Open the Boards Manager. Go to Tools > Board > Boards Manager…
- Search for ESP32 and press install button for the "ESP32 by Espressif Systems"
- In the Arduino IDE, go to Sketch > include library > Manage Libraries:
- Search for TFT_eSPI and click on install
- (optional) Search for SparkFun_LIS2DH12_Arduino_Library and click on install
copy User_setup.h to TFT_eSPI in your Arduino libraries folder
you can find the Arduino libraries folder like this:
In the Arduino IDE, go to File > Preferences > Sketchbook location:
go to this folder/libraries/TFT_eSPI and overwrite User_setup.h with the file from this repository
if Arduino IDE caches the compiled library, restarting the IDE might help
more info can be found here
https://github.com/Bodmer/TFT_eSPI#Tips
- Open the file Animated_Eyes_1/Animated_Eyes_1.ino from this repository in the arduino IDE
- In the Arduino IDE, go to Tools > Board > ESP32 Wrover Module
- In the Arduino IDE, go to Tools > Port > Select the port that the badge is connected on
- Press the Upload button, or go to Sketch > Upload
The display switch should be in the ON position (down)
If you want to enable the display backlight also when in the AUTO position then uncomment line 89
#define BACKLIGHT_CONNECTED_TO_LIS
This will configure the interrupt pin of the LIS accelerometer to be always on
Press the Boot button on the back to manually blink the eye