woody
02/23/2025, 11:02 AMjag flash esp32s3-spiram-octo, I'm using SDK version: v2.0.0-alpha.174.
I tried to get the RGB LED running with this program:
import pixel-strip
import gpio
main:
rgb-pin := gpio.Pin 38 --output=true
// while true:
// // sleep --ms=0 => 40 µs
// // sleep --ms=1..9 => 10ms
// // sleep --ms=10..x => 20ms..10+x
// rgb-pin.set 1
// sleep --ms=1
// rgb-pin.set 0
// sleep --ms=1
rgb := pixel-strip.PixelStrip.uart 1 --pin=rgb-pin --invert-pin=false
while true:
rgb.output #[0xff] #[0xff] #[0xff]
print "white"
sleep --ms=1000
rgb.output #[0xff] #[0] #[0]
print "red"
sleep --ms=1000
rgb.output #[0] #[0xff] #[0]
print "green"
sleep --ms=1000
rgb.output #[0] #[0] #[0xff]
print "blue"
sleep --ms=1000
Program compiled and downloaded fine, but on the LED nothing happened. I measured Pin 38 with an Oscilloscope an it stay permanently low. What do I miss in my program? Or is the package buggy?floitsch
02/23/2025, 12:36 PMfloitsch
02/23/2025, 12:37 PMfloitsch
02/23/2025, 12:37 PMfloitsch
02/23/2025, 12:42 PMwoody
02/23/2025, 1:38 PMwoody
02/23/2025, 1:42 PMwoody
02/23/2025, 1:42 PMfloitsch
02/23/2025, 1:42 PMwoody
02/23/2025, 1:43 PMfloitsch
02/23/2025, 1:43 PMfloitsch
02/23/2025, 1:44 PMfloitsch
02/23/2025, 1:45 PMwoody
02/23/2025, 1:52 PMfloitsch
02/23/2025, 1:52 PMwoody
02/23/2025, 2:20 PMwoody
02/23/2025, 2:22 PMfloitsch
02/23/2025, 2:39 PMwoody
02/23/2025, 4:23 PMkasperl
02/23/2025, 4:28 PMkasperl
02/23/2025, 4:29 PMkasperl
02/23/2025, 4:29 PMkasperl
02/23/2025, 4:30 PMkasperl
02/23/2025, 4:30 PMfloitsch
02/23/2025, 4:31 PMprograms partition.kasperl
02/23/2025, 4:33 PMkasperl
02/23/2025, 4:33 PMfloitsch
02/23/2025, 4:35 PMFlashRegistry that sums up the holes: https://github.com/toitlang/toit/blob/master/system/flash/registry.toit#L29
And then the API functions to expose it.