SunFounder ESP32 Starter Kit
def decodeKeyValue(data):
if data == 0x16:
return "0"
if data == 0x0C:
return "1"
if data == 0x18:
return "2"
if data == 0x5E:
...
2. Next, we incorporate several debug functions into the program. While these functions are essential, they are not
directly related to the desired outcome we aim to achieve.
from ir_rx.print_error import print_error
ir.error_function(print_error) # Show debug information
3. Lastly, we use an empty loop for the main program and implement a try-except structure to ensure the program
exits with the ir object properly terminated.
try:
while True:
pass
except KeyboardInterrupt:
ir.close()
• Try Statement - Python Docs
6. Funny Projects
3.33 6.1 Fruit Piano
Have you ever wanted to play the piano but couldn’t afford one? Or maybe you just want to have some fun with diy a
fruit piano? Well, this project is for you!
With just a few touch sensors on the ESP32 board, you can now play your favorite tunes and enjoy the experience of
playing the piano without breaking the bank.
Required Components
In this project, we need the following components.
It’s definitely convenient to buy a whole kit, here’s the link:
Name ITEMS IN THIS KIT LINK
ESP32 Starter Kit 320+
You can also buy them separately from the links below.
3.33. 6.1 Fruit Piano 407