This library offers simple interfaces to the hardware peripherals on the Fri3d Camp Badge so you can program the badge using the Arduino IDE and related programming environments. You can find more information on the badge at http://fri3d.be/badge
Download this repo as a .ZIP file and install it, similar to other Arduino libraries: https://www.arduino.cc/en/Guide/Libraries#toc4
Download the repo from https://github.com/espressif/arduino-esp32 as a .ZIP file and unzip it to an espressif/esp32 directory in your Mydocuments\Arduino\hardware folder.
Run get.exe (make sure to run this as administrator), found in the esp32/tools folder.
Download the repo from https://github.com/espressif/arduino-esp32 as a .ZIP file and unzip it to an espressif/esp32 directory in your Home directory.
Run the tools/get.py python script to download the tools. Using a terminal, navigate to the esp32/tools folder and run python get.py.
The get.py python script will download the Xtensa GNU tools and the ESP32 software development kit (SDK), and unzip them to the proper location. You should see a few new folders in the tools directory, including sdk and xtensa-esp32-elf once it’s done.
When the ESP32 board and this library have been installed, the ESP boards (under Tools/Board) and Fri3d Camp Badge examples (under File/Examples) should be available in your Arduino IDE.
In order to flash code to your badge:
- Connect the badge to your computer with a USB cable
- Select the
ESP32 Dev Moduleboard underTools/Board - Set your port to the correct port under
Tools/Port. On a modern MacBook Pro, this port is/dev/cu.SLAB_USBtoUART. - You can now upload Arduino programs to the Fri3d Camp badge.
- Explore the examples for sample Arduino code for the Fri3d Camp badge unnder
File > Examples > Fri3dBadge
This library offers various classes to easily interface with the peripherals on board the Fri3d Camp badge. The following classes are available:
Fri3dAcceleratorsupports the ADXL345 accelerometer, using Adafruit's Sensor classes. The1.Basics/accelerometerdemonstrates its usage.Fri3dButtonssupports the two buttons and two touchpads withgetButtonandgetTouchpadfunctions. The1.Basics/buttonsexample shows how to check the button and touchpad states.Fri3dBuzzersupports the buzzer withsetFrequency(0-1000s) andsetVolume(0-255) functions. Check1.Basics/buzzerfor example code.Fri3dMatrixsupports the LED matrices withsetPixelandgetPixelfunctions on a 14x5 screen buffer. The matrix runs a thread in the background to render the LED matrix. See the1.Basics/matrixexample for a basic setup and the1.Basics/fontexample for a scrolling text demo.Fri3dServoJewelsupports servo motors, using the Servo Jewel add-on board that comes with the Fri3d Camp robot kit. Check3.Jewels/OneServoand3.Jewels/TwoServosexamples for demos.
- Make sure the battery is switched off. If this does not work unplug the badge from your pc and plug it back in. Now it should work.
- Make sure you have the latest version of arduino IDE installed, most of the development was done using version 1.8.5