Code for Musala (not the mountain peak).
graph TD;
1((Warming up))-->2;
2((Waiting for movement))-->|Movement|3
3((Playing music))-->|Played music|2
| State | LED | Music |
|---|---|---|
| Warming up | Blinking longer and longer | Playing longer and longer at low volume |
| Waiting for movement | Off | Off |
| Playing music | Blinking longer and longer | Playing at full volume |
The upper two wires go to the speaker.
[no picture]
This is the time until the fragments of music started playing, which I measured in booting_times.csv. The mean is around 40 seconds. The highest value ever measured is 69 seconds, hence the warming up time is set to 70 seconds.
Note that maybe before 40 seconds, the music is playing, yet there is no sound at that starting part. It is irrelevant.
| From | To |
|---|---|
| Arduino 3.3 V | PIR Vin |
| Arduino GND | PIR GND |
| Arduino 12 | PIR out |
- Ubuntu 22.04 Jammy Jellyfish LTS
- Arduino IDE v2.0.1 Linux 64 bit AppImage
Earlier reported at here
Indeed:
sudo dmesg -w
Results in:
[ 3352.611354] usb 1-4: new full-speed USB device number 12 using xhci_hcd
[ 3352.761926] usb 1-4: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
[ 3352.761939] usb 1-4: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 3352.761944] usb 1-4: Product: USB Serial
[ 3352.764411] ch341 1-4:1.0: ch341-uart converter detected
[ 3352.765467] usb 1-4: ch341-uart converter now attached to ttyUSB0
[ 3353.314104] input: BRLTTY 6.4 Linux Screen Driver Keyboard as /devices/virtual/input/input32
[ 3353.436461] usb 1-4: usbfs: interface 0 claimed by ch341 while 'brltty' sets config #1
[ 3353.437038] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[ 3353.437051] ch341 1-4:1.0: device disconnected
Solution: uninstall brltty by doing:
sudo apt-get remove brltty
- SparkFun board for Arduino IDE
- Download boards from
https://github.com/sparkfun/Arduino_Boards/raw/main/IDE_Board_Manager/package_sparkfun_index.json - SparkFun Qwiic MP3 Trigger Arduino Library




