I'm new to Python so I decided to replicate this one
youtube : https://www.youtube.com/watch?v=3kU3_b78JpA&ab_channel=NikunjPanchal
But there is an error in coding section
from machine import UART, Pin
bt = UART(0,9600)
L1 = Pin(2,Pin.OUT)
L2 = Pin(3,Pin.OUT)
while True:
br = bt.readline()
if "ON1" in br:
L1.value(0)
elif "OFF1" in br:
L1.value(1)
elif "ON2" in br:
L2.value(0)
elif "OFF2" in br:
L2.value(1)
error:
Traceback (most recent call last):
File "<stdin>", line 12, in <module>
TypeError: 'NoneType' object isn't iterable
Anyone know how to fix this?