2 from PIL
import Image
, ImageDraw
3 from enviroplus
.noise
import Noise
5 print("""noise-profile.py - Get a simple noise profile.
7 This example grabs a basic 3-bin noise profile of low, medium and high frequency noise, plotting the noise characteristics as coloured bars.
17 cs
=ST7735
.BG_SPI_CS_FRONT
,
24 img
= Image
.new('RGB', (disp
.width
, disp
.height
), color
=(0, 0, 0))
25 draw
= ImageDraw
.Draw(img
)
29 low
, mid
, high
, amp
= noise
.measure()
36 draw
.rectangle((0, 0, disp
.width
, disp
.height
), (0, 0, 0))
37 img
.paste(img2
, (1, 0))
38 draw
.line((0, 0, 0, amp
), fill
=(int(low
), int(mid
), int(high
)))