Alexx Kaos 12/19/2023 03:51 PMHI guys, just trying to get set up with Toit right now. I've loaded up the example pwm script, but it's throwing an UNKNOWN ERROR 0x102(258).
I know the Pin is correct (it works with the basic standard led blink script), and is pwm compatible (from upython and arduino projects).
I'm using a seeed XIAO esp3-c3, GPIO#10
import gpio
import gpio.pwm
main:
led := gpio.Pin 10
generator := pwm.Pwm --frequency=50
channel := generator.start led
//channel.set-duty-factor 0.5
sleep --ms=10_000
channel.close
generator.close
led.close
And the monitor outputs:
[jaguar] INFO: program aecc3774-fdf7-fc6a-1e25-b3c397b6481f started
E (2734368) ledc: freq_hz=1000 duty_resolution=16
******************************************************************************
Decoding by
jag, device has version <2.0.0-alpha.126>
******************************************************************************
EXCEPTION error.
UNKNOWN ERROR 0x102(258)
0: pwm-init_ <sdk>\gpio\pwm.toit:177:3
1: Pwm <sdk>\gpio\pwm.toit:103:12
2: main led_pwm.toit:6:16
******************************************************************************
[jaguar] ERROR: program aecc3774-fdf7-fc6a-1e25-b3c397b6481f stopped - exit code 1
(edited)