Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Well Tempered Itsy Bitsy
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Well Tempered Itsy Bitsy

by hitsware2 on Sat Oct 17, 2020 7:55 pm

Code: Select all | TOGGLE FULL SIZE
import time; import board; import pulseio; import digitalio; import random

f0 = pulseio.PWMOut(board.A2, duty_cycle=1500, frequency=100, variable_frequency=True)
f1 = pulseio.PWMOut(board.A3, duty_cycle=1500, frequency=150, variable_frequency=True)
f2 = pulseio.PWMOut(board.D9, duty_cycle=0, frequency=300, variable_frequency=True)
f3 = pulseio.PWMOut(board.D12, duty_cycle=0, frequency=1000, variable_frequency=True)

c=[16,12,18,12]; m=[4,8,6,8]; p=[1,0,1,1]; o=[1,4,8]; d=[9000,4000,8000]

while True:
    for x in range(0,4):
        f0.frequency=16*c[x]
        f1.frequency=12*c[x]
        for y in range(0,4):
            r=random.randint(0,2)
            f2.frequency=c[x]*m[y]*o[r]; f2.duty_cycle=d[r]
            for a in range(0,2):
                z=((2*y)+a)%4
                f3.duty_cycle=20000*p[z]; time.sleep(0.004); f3.duty_cycle=0
                time.sleep(0.15)

[url]
https://soundcloud.com/michael-miller-547891485/mach
[/url]
Attachments
mach.jpg
mach.jpg (143.78 KiB) Viewed 72 times

hitsware2
 
Posts: 11
Joined: Fri Sep 11, 2020 9:54 pm

Re: Well Tempered Itsy Bitsy

by johnpark on Fri Oct 23, 2020 12:55 pm

Wow, really nicely done!

johnpark
 
Posts: 794
Joined: Wed Mar 25, 2009 2:15 pm

Re: Well Tempered Itsy Bitsy

by hitsware2 on Sun Oct 25, 2020 3:45 pm

Thank You !

hitsware2
 
Posts: 11
Joined: Fri Sep 11, 2020 9:54 pm

Please be positive and constructive with your questions and comments.