guild icon
Toit
#Pixelstrip on ESP32S3
Thread channel in help
woody
woody 02/23/2025 11:02 AM
Hi,
I got the ESP32-S3-DevKitC-1 and flashed it with jag 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?
woodyOPwoody
Hi, I got the ESP32-S3-DevKitC-1 and flashed it with jag flash esp32s3-spiram-octo, I'm using SDK version: v2.0.0-alpha.174. I tried to get the RGB LED running with this prog...
floitsch
floitsch 02/23/2025 12:36 PM
I just copied your code verbatim and it worked for me.
floitsch
floitsch 02/23/2025 12:37 PM
Make sure that the pin 38 isn't pulled low somehow.
floitsch
floitsch 02/23/2025 12:37 PM
For example, if you have connected the pin to DO instead of DI.
floitsch
floitsch 02/23/2025 12:42 PM
Note that I didn't have an ESP32S3 with octo SPIRAM and ran the test on a board without any SPIRAM, but I doubt that would make a difference. I can try to find one, if you can't find the issue.
woody
woody 02/23/2025 01:38 PM
Hi @floitsch , thx for your quick answer. To make shure that everything is wired as expected I uncommeted line 6-13. Then Pin 38 toggles with 50 Hz.
woody
woody 02/23/2025 01:42 PM
The board itself came with a preinstalled firmware and the led made some rgb pattern, so everything on the board should be alright. I flashed the esp32s3-spiram-octo because it was the only image that booted without a psram error. BTW the board a china clone but in any case I should measure some low/high egdes on Pin 38
woody
woody 02/23/2025 01:42 PM
Das ESP32-S3-WROOM-1 Entwicklungskit bietet eine Vielzahl von Funktionen für Elektronik- und IoT-Projekte. Die Besonderheiten wie die beiden USB C-Anschlüsse und die integrierte RGB-LED machen es vielseitig einsetzbar.
floitsch
floitsch 02/23/2025 01:42 PM
Could you try with the standard esp32s3 envelope?
woody
woody 02/23/2025 01:43 PM
Ok, I will try
floitsch
floitsch 02/23/2025 01:43 PM
You will see an error, but it shouldn't be fatal
floitsch
floitsch 02/23/2025 01:44 PM
Are you trying to run the on-board led?
floitsch
floitsch 02/23/2025 01:45 PM
I think I just found a similar board in my stash. I will try to run it a bit later.
woody
woody 02/23/2025 01:52 PM
Hi, I switch to the esp32s3 image and found the signal with the scope. I switched back to the esp32s3-spiram-octo image and see now the same signal with the scope. Sorry, my fault. The LED is still not on, but probably it's connected to another pin. The signal on the scope seems to be correct.
floitsch
floitsch 02/23/2025 01:52 PM
Good.
woody
woody 02/23/2025 02:20 PM
On my clone board DI is connected to Pin 48. Now the LED works. Thx again!
woody
woody 02/23/2025 02:22 PM
One more question: Is there a way to find out how much flash is still free? system.serial-print-heap-report give me only RAM/Heap information.
woodyOPwoody
One more question: Is there a way to find out how much flash is still free? system.serial-print-heap-report give me only RAM/Heap information.
floitsch
floitsch 02/23/2025 02:39 PM
Not sure. I'm guessing you are talking about the free flash in the data partition and not the OTA partition.
@bitphlipphar might know
woody
woody 02/23/2025 04:23 PM
I don't know in what partion the toit containers are flashed. I just want to know how much of the toit program flash is used (by one container or by all containers) and how much space is left.
woodyOPwoody
I don't know in what partion the toit containers are flashed. I just want to know how much of the toit program flash is used (by one container or by all containers) and how much sp...
bitphlipphar
bitphlipphar 02/23/2025 04:28 PM
Toit containers that ship with the base image built from an envelope are put in the OTA partitions.(edited)
bitphlipphar
bitphlipphar 02/23/2025 04:29 PM
Program your microcontrollers in a fast and robust high-level language. - toitlang/toit
bitphlipphar
bitphlipphar 02/23/2025 04:29 PM
I think it is possible to extract the information using the Toit tooling.
bitphlipphar
bitphlipphar 02/23/2025 04:30 PM
The other containers, the ones that are dynamically installed over the air, are put in the programs partition: https://github.com/toitlang/toit/blob/master/toolchains/esp32/partitions.csv#L27.
Program your microcontrollers in a fast and robust high-level language. - toitlang/toit
bitphlipphar
bitphlipphar 02/23/2025 04:30 PM
That partition can also contain data.
floitsch
floitsch 02/23/2025 04:31 PM
Jaguar uses the programs partition.
bitphlipphar
bitphlipphar 02/23/2025 04:33 PM
I don't think we have a programatic way of accessing the capacity and used sized of the programs partition. Would not be hard to add though.
bitphlipphar
bitphlipphar 02/23/2025 04:33 PM
Would be nice if Jaguar could log it when you install/uninstall container images.
bitphlippharbitphlipphar
I don't think we have a programatic way of accessing the capacity and used sized of the programs partition. Would not be hard to add though.
floitsch
floitsch 02/23/2025 04:35 PM
Agreed. I think it would just be an additional method on FlashRegistry 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.
Program your microcontrollers in a fast and robust high-level language. - toitlang/toit
28 messages in total