There are new worksheets for the Half-size line follower on Drive.
We will be having sheets to help you control how your robot behaves. Here's a list of what we will be doing...
Useful Code:
--------------------------------------------------------------------------------------------------------------------------------
# Filename to be printed
Thisfile = "LEDvar.py"
# History
from machine import Pin, PWM, ADC,UART
import time, utime
LEDvar = PWM(Pin(20)) # this does fade only the LED
LEDvar.freq(1000)
#### start here ==========================================
print(Thisfile)
while True:
count = 0
while (count <35000):
count = count+200
LEDvar.duty_u16(count)
time.sleep(0.01)
while (count >0):
count = count-200
LEDvar.duty_u16(count)
time.sleep(0.01)
Make a free website with Yola