Skip to content

Instantly share code, notes, and snippets.

View kevalpatel2106's full-sized avatar
🚧

Keval Patel kevalpatel2106

🚧
View GitHub Profile
speaker-test -t wav
sudo raspi-config
sudo nano .asoundrc.
pcm.!default {
type asym
capture.pcm "mic"
playback.pcm "speaker"
}
pcm.mic {
type plug
slave {
pcm "hw:1,0"
}
sudo nano /etc/asound.conf
pi@raspberrypi:~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
import os
import time
def measure_temp():
temp = os.popen("vcgencmd measure_temp").readline()
return (temp.replace("temp=",""))
while True:
print(measure_temp())
time.sleep(1)
python monitor-temp.py
nano monitor-temp.py