Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
GiovanniMerici authored Nov 22, 2022
0 parents commit 16124ca
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions RandomColorlightwihtoutPWM.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from machine import Pin, PWM
from random import randint
import time

pins = [13, 12, 11]
freq_num = 100

led1 = Pin(pins[0], Pin.OUT)
led2 = Pin(pins[1], Pin.OUT)
led3 = Pin(pins[2], Pin.OUT)



while True:
val1 = randint(0,1)
val2 = randint(0,1)
val3 = randint(0,1)
time.sleep_ms(2)
led1.value(val1)
led2.value(val2)
led3.value(val3)

0 comments on commit 16124ca

Please sign in to comment.