first commit

This commit is contained in:
gaohz committed 2024-06-06 04:13:43 +00:00
commit b8768c3ff8
249 files changed
+38439

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
# Test of the softTone module in wiringPi
# Plays a scale out on pin 3 - connect pizeo disc to pin 3 & 0v
import wiringpi
PIN = 3
SCALE = [262, 294, 330, 349, 392, 440, 494, 525]
wiringpi.wiringPiSetup()
wiringpi.softToneCreate(PIN)
while True:
for idx in range(8):
print(idx)
wiringpi.softToneWrite(PIN, SCALE[idx])
wiringpi.delay(500)