Skip to content

richelbilderbeek/musala

Repository files navigation

Mus-sala

Mus-sala

Code for Musala (not the mountain peak).

Behavior

graph TD;
    1((Warming up))-->2;
    2((Waiting for movement))-->|Movement|3
    3((Playing music))-->|Played music|2
Loading
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

Hardware

SparkFun RedBoard

SparkFun Qwiic MP3 Trigger

The upper two wires go to the speaker.

PIR sensor

Speaker

[no picture]

Warming up times

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.

Connections

From To
Arduino 3.3 V PIR Vin
Arduino GND PIR GND
Arduino 12 PIR out

Troubleshooting

Port not found

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

Links

Releases

No releases published

Packages

 
 
 

Contributors

Languages