Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 33 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ sudo apt-get update

sudo apt-get upgrade

curl -sSL https://get.pimoroni.com/enviroplus | bash
Install the [Enviro+ Python library](https://learn.pimoroni.com/article/getting-started-with-enviro-plus#installing-the-enviro-python-library)

sudo pip3 install matplotlib
sudo pip3 install matplotlib ltr559

sudo python -m pip uninstall sounddevice

Expand All @@ -43,35 +43,37 @@ Follow instructions at:
https://learn.adafruit.com/adafruit-i2s-mems-microphone-breakout/raspberry-pi-wiring-test
including “Adding Volume Control”

Use the following instead of the documented text for ~/.asoundrc:

1. #This section makes a reference to your I2S hardware, adjust the card name
2. #to what is shown in arecord -l after card x: before the name in []
3. #You may have to adjust channel count also but stick with default first
4. pcm.dmic_hw {
5. type hw
6. card adau7002
7. channels 2
8. format S32_LE
9. }
10.
11. #This is the software volume control, it links to the hardware above and after
12. #saving the .asoundrc file you can type alsamixer, press F6 to select
13. #your I2S mic then F4 to set the recording volume and arrow up and down
14. #to adjust the volume
15. #After adjusting the volume - go for 50 percent at first, you can do
16. #something like
17. #arecord -D dmic_sv -c2 -r 48000 -f S32_LE -t wav -V mono -v myfile.wav
18. pcm.dmic_sv {
19. type softvol
20. slave.pcm dmic_hw
21. control {
22. name "Master Capture Volume"
23. card adau7002
24. }
25. min_dB -3.0
26. max_dB 30.0
27. }
Use the following instead of the documented text for `~/.asoundrc`

```
#This section makes a reference to your I2S hardware, adjust the card name
#to what is shown in arecord -l after card x: before the name in []
#You may have to adjust channel count also but stick with default first
pcm.dmic_hw {
type hw
card adau7002
channels 2
format S32_LE
}

#This is the software volume control, it links to the hardware above and after
#saving the .asoundrc file you can type alsamixer, press F6 to select
#your I2S mic then F4 to set the recording volume and arrow up and down
#to adjust the volume
#After adjusting the volume - go for 50 percent at first, you can do
#something like
#arecord -D dmic_sv -c2 -r 48000 -f S32_LE -t wav -V mono -v myfile.wav
pcm.dmic_sv {
type softvol
slave.pcm dmic_hw
control {
name "Master Capture Volume"
card adau7002
}
min_dB -3.0
max_dB 30.0
}
```

-------------------------------------------------

Expand Down
6 changes: 3 additions & 3 deletions northcliff_spl_monitor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ST7735
import st7735
from PIL import Image, ImageDraw, ImageFont
from fonts.ttf import RobotoMedium as UserFont
import sounddevice as sd
Expand Down Expand Up @@ -267,9 +267,9 @@ def run(self):
print("Keyboard Interrupt")

# Set up display
disp = ST7735.ST7735(
disp = st7735.ST7735(
port=0,
cs=ST7735.BG_SPI_CS_FRONT,
cs=st7735.BG_SPI_CS_FRONT,
dc=9,
backlight=12,
rotation=270)
Expand Down