How to use the enviroplus.noise.Noise function in enviroplus

To help you get started, we’ve selected a few enviroplus examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pimoroni / enviroplus-python / examples / noise-profile.py View on Github external
import ST7735
from PIL import Image, ImageDraw
from enviroplus.noise import Noise

print("""noise-profile.py - Get a simple noise profile.

This example grabs a basic 3-bin noise profile of low, medium and high frequency noise, plotting the noise characteristics as coloured bars.

Press Ctrl+C to exit!

""")

noise = Noise()

disp = ST7735.ST7735(
    port=0,
    cs=ST7735.BG_SPI_CS_FRONT,
    dc=9,
    backlight=12,
    rotation=90)

disp.begin()

img = Image.new('RGB', (disp.width, disp.height), color=(0, 0, 0))
draw = ImageDraw.Draw(img)


while True:
    low, mid, high, amp = noise.get_noise_profile()
github pimoroni / enviroplus-python / examples / noise-amps-at-freqs.py View on Github external
import ST7735
from PIL import Image, ImageDraw
from enviroplus.noise import Noise

print("""noise-amps-at-freqs.py - Measure amplitude from specific frequency bins

This example retrieves the median amplitude from 3 user-specified frequency ranges and plots them in Blue, Green and Red on the Enviro+ display.

As you play a continuous rising tone on your phone, you should notice peaks that correspond to the frequency entering each range.

Press Ctrl+C to exit!

""")

noise = Noise()

disp = ST7735.ST7735(
    port=0,
    cs=ST7735.BG_SPI_CS_FRONT,
    dc=9,
    backlight=12,
    rotation=90)

disp.begin()

img = Image.new('RGB', (disp.width, disp.height), color=(0, 0, 0))
draw = ImageDraw.Draw(img)


while True:
    amps = noise.get_amplitudes_at_frequency_ranges([

enviroplus

Enviro pHAT Plus environmental monitoring add-on for Raspberry Pi

MIT
Latest version published 7 months ago

Package Health Score

52 / 100
Full package analysis

Similar packages