I narrowed it down to the timer or the call back blink but not sure what is going on.
from machine import Pin, Timer
from time import sleep
import machine
led = Pin(2, Pin.OUT)
timer = Timer()
toggle=True
led.off()
def blink(timer):
led.toggle()
timer.init(freq=2.5, mode=Timer.PERIODIC, callback=blink)
MPY: soft reboot
Traceback (most recent call last):
File "<stdin>", line 6, in <module>
TypeError: function takes 1 positional arguments but 0 were given
Only getting this error for the ESP8266 aka NodeMcu Esp-12F board.
No issues on Pico for Pin('LED', Pin.OUT)
The LED on ESP comes on and stays on and then give argument error.
Please advise.
Thanks