https://toitlang.org/ logo
Join Discord
Powered by
# help
  • Problem dhtxx and new version v2.0.0-alpha.182
    f

    Fernan

    06/01/2025, 7:09 PM
    Hi, I,ve just updated to the new version and I,m having the "EXCEPTION error. insufficient signals from DHT" since the update, and don,t find a way to downgrade to the functional version i had before that was the .175
    f
    k
    • 3
    • 117
  • data package ploblem
    u

    ~~boss~~

    06/08/2025, 5:28 AM
    Hi,im having ploblem with installing container datacake "package mqtt not found"
    f
    k
    • 3
    • 66
  • Hanging up jag monitor, UART converter vs dev board USB
    a

    addshore

    06/10/2025, 11:31 AM
    When hitting Ctrl + C on
    jag monitor
    using dev boards (USB pins on ESPs) I have ot hit it multiple times, it seems to hang, I see
    ^C^C^C^C
    in the termainl baecause of this and eventaully it exits. While using uart converters external to deav boards hitting ctrl + c normally instantly exits (desried behaviour) This is on WSL, and basically i have the issue with
    /dev/ttyACM*
    devices, but all
    /dev/ttyUSB
    devices are fine. Any thoughts on what might be up? (Otherwise i might try debugging this myself with a build of jag etc)
    f
    • 2
    • 10
  • A bunch of errors building jaguar
    a

    addshore

    06/10/2025, 1:50 PM
    I have build jaguar before, however appear to be getting a whole bunch of error from the make this time... https://pastebin.com/XCPubtYs on master of toit and main of jaguar 😦
    f
    • 2
    • 14
  • Is there a way to have a container to tell jag to turn off / diable wifi?
    a

    addshore

    06/11/2025, 3:45 PM
    I have mainly used
    -D jag.wifi=false
    while using the
    run
    command. And just gave it a go while installing a container, however on container restart jag and wifi came back up. Is there a way to either 1) get a container to tell jag to turn off the wifi? or 2) have something like
    -D jag.wifi=false
    be more persistent accross container restarts? while keeping jaguar running?
    k
    f
    • 3
    • 2
  • Remove jaguar from FW envelope
    a

    addshore

    06/12/2025, 10:49 AM
    Looking at the list of containers in a default toit built fw envelope, I see one called system
    Copy code
    system: 
      Kind: snapshot
      Id: 2ee8a16f-3df6-a81f-7174-7347ab9a8108
      Size: 165638
      Flags: 
        - trigger=boot
        - critical
    Is removing this essentially the same as building my own fw image without jaguar? (I'm guessing not, as I removed this, and also added my own container, flashed a device and seemingly it doesnt start up)
    f
    • 2
    • 9
  • ESPnow pairing
    k

    kaxori

    06/12/2025, 7:27 PM
    Before sending to a specific MAC address, pairing must be performed. Repeated pairing will result in an error message. I haven't found a function yet to check whether pairing has already occurred. For this reason, I first delete a possible previous pairing and then create it again. Don't find the solution optimal and look for a better one. Does anyone already have a good implementation?
    f
    • 2
    • 2
  • How to call a function of the base class?
    k

    kaxori

    06/13/2025, 4:46 PM
    If a derived class and its base class have both the same function implemented. But if the base calls its function the function of the derived class is executed. How can I force to call the base class function ?
    f
    k
    • 3
    • 20
  • Jaguar routing problem, followed by container stopping / not restarting
    a

    addshore

    06/16/2025, 2:12 PM
    I have added a watchdog to the container now so I expect it wont cause me an issue again, however I'm confused about what has happeend here The script was running, as shown by the INFO log line Then jaguar seems to have a panic,
    Routing problem
    and tries to reconnect? fails? and backs off? Then I see my container print
    udptocsv
    after which it tries to emit this over UDP Then there are logs to do with wifi reconnecting? After which jaguar seems to be back up? However the container is then stuck? I guess it is stuck here
    Copy code
    socket.send
        udp.Datagram row.to-byte-array address
    f
    • 2
    • 65
  • [uart] warning: event queue is full
    a

    addshore

    06/30/2025, 9:32 AM
    Trying to start some Uart comms on a bit of new hardware, and running into this warning in a loop forever https://github.com/toitlang/toit/blob/cc2adf3fa0022dd7392d793c07fcb3fc45cba946/src/resources/uart_esp32.cc#L627
    Copy code
    [uart] warning: event queue is full
    [uart] warning: event queue is full
    [uart] warning: event queue is full
    [uart] warning: event queue is full
    [uart] warning: event queue is full
    [uart] warning: event queue is full
    [uart] warning: event queue is full
    [uart] warning: event queue is full
    [uart] warning: event queue is full
    [uart] warning: event queue is full
    [uart] warning: event queue is full
    Seems to do that until reaching
    Copy code
    Potential deadlock detected:
      Process: 0
      Program: 84bd67cd-f6e7-5359-850b-5709092d5c01
    fatal: Potential dead-lock
    
    abort() was called at PC 0x4202f841 on core 0
    Or sometimes it breaks out of the loop and works? Any pointers for debugging / whats going on?
    k
    • 2
    • 3
  • How do I wake up ESP32S3 from 10MHz CPU clock?
    r

    RaspPi Parts

    07/15/2025, 4:04 PM
    Hello ESP32S3 Experts, I use Arduino IDE v2.3.6 to programme my ESP32S3 board. I set its system clock to 10MHz with the official ESP32 board manager. Codes are good and programming was successful. However, my board fell into Super Deep Sleep and cut the power of the USB serial port. Then, I cannot programme it any more. Please help me to wake it up! 😴 πŸ‘Ž My ESP32S3 board have hardware PWK button, Boot button, Reset Button, Flash Button, etc. I think they can cure it. πŸ˜’ I know here are many ES32S3 experts. πŸ™
    f
    • 2
    • 5
  • unexpected eof error
    u

    ~~boss~~

    07/20/2025, 10:53 AM
    this showed up when i run jag monitor
    f
    • 2
    • 56
  • Pause instead of sleep?
    a

    addshore

    07/30/2025, 3:53 PM
    Is there a way to sleep, but not allowed other tasks to run during that period?
    k
    • 2
    • 11
  • w5500
    w

    wahyudi124

    07/31/2025, 5:48 AM
    #1025033592688087120 How to use ethernet using w5500 custom spi GPIO ?
    f
    • 2
    • 1
  • Embed a 15KB file with a container
    a

    addshore

    07/31/2025, 9:00 AM
    I have a 15KB PCM audio file that I want to embed with a container. My plan is to have the container send this data to a C service to play to a bluetooth speaker.
    f
    • 2
    • 1
  • simple BLE HID device example.
    k

    kaxori

    08/01/2025, 7:54 PM
    Has anyone already implemented something like this and can provide code snippets? The goal is to trigger the smartphone camera with volume-up event.
    f
    • 2
    • 3
  • How to configure static IP using WIFI or ETH
    w

    wahyudi124

    08/03/2025, 4:21 AM
    How to configure wifi and ethernet using static ip
    f
    • 2
    • 5
  • USB Audio Class Device
    z

    z3ugma

    08/03/2025, 4:34 AM
    I am aiming to make an ESP32-S3: Appear as a USB Audio Class Device when plugged into a host PC Receive digital audio (PCM) from the host. Decode the audio and play it into a DAC/amp An alternative plan I have looked at would be: 1. USB Audio Class Support use the TinyUSB stack, which is supported in ESP-IDF and Arduino-ESP32 Implement a UAC1 or UAC2 sink device (only needs to receive audio). 2. Audio Streaming Interface The host sends PCM frames (typically 16-bit, stereo, 44.1kHz or 48kHz) over isochronous USB endpoints. define a USB descriptor that tells the host that the device supports audio streaming at certain formats. 3. Audio Output Path Streamed audio is written to a DMA-capable I2S buffer, which outputs to a DAC to the headphone amp Has anyone implemented the UAC2 or UAC1? Something like [UAC 2.0 ](https://docs.espressif.com/projects/esp-iot-solution/en/latest/usb/usb_overview/usb_device_solutions.html#usb-audio-device-solution)
    f
    m
    • 3
    • 7
  • Problems with seeed esp32-C3
    k

    kaxori

    08/03/2025, 10:17 AM
    I flashed 4 seeed esp32-C3 with identical flash parameters, but only one connects successfully to wifi. 3 devices report
    running Jaguar failed due to 'DEADLINE_EXCEEDED'
    Did anyone have similar experiences and a solution ?
    f
    k
    • 3
    • 34
  • TOIT USB
    m

    MichaelK

    08/04/2025, 2:31 PM
    https://cdn.discordapp.com/attachments/1401935458786873394/1401935458992132217/toit_usb_q.txt?ex=6892be64&is=68916ce4&hm=7306fc216183d12fc18a180384e4f4584d6f11ea994dff29cb8fe8cb6ba3ed56&
    f
    • 2
    • 1
  • Can a Cat-M modem connect to an existing 4G/LTE mobile network?
    r

    RaspPi Parts

    08/04/2025, 3:23 PM
    Hello Friends, I am very confused when I choose mobile network and global SIM card service providers. They said LTE Cat-1 (the slower version of LTE) modem can connect to 4G mobile network. So, how about Cat-M modem? Can it connect to an existing 4G mobile network? Please help me to clarify. 🧐
    f
    • 2
    • 2
  • Stop a blocking sleep
    p

    pkarsy

    08/04/2025, 6:15 PM
    Hi, lets say we have this task task:: pin := gpio.Pin 2 --output while true: pin.set 1 sleep --ms=2000 pin.set 0 sleep --ms=2000 After a button press(another task or the same task) we need to respond immediatelly, so the sleep here is inapropriate. I have tried with "monitor" Mutex await try-await but I cannot do it. Ok there is the possibility of a tight loop with "sleep --ms=50" but I have hoped for something more elegant
    f
    • 2
    • 7
  • MALLOC Failed Re-Creating SPI Device
    z

    z3ugma

    08/06/2025, 6:26 PM
    Copy code
    Heap report @ out of memory in primitive 8:2:
      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      β”‚   Bytes   β”‚  Count   β”‚  Type                                               β”‚
      β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
      β”‚    5648   β”‚    513   β”‚  heap overhead                                      β”‚
      β”‚  173528   β”‚    467   β”‚  untagged                                           β”‚
      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
      Total: 179176 bytes in 467 allocations (53%), largest free 116k, total free 152k
    
    ******************************************************************************
    MALLOC_FAILED error.
      0: S6d05a1.draw-test-pattern s6d05a1.toit:560:20
      1: main.<block>              display_new.toit:43:12
      2: SmallInteger_.repeat      <sdk>/core/numbers.toit:1288:3
      3: main                      display_new.toit:42:5
    ******************************************************************************
    I can reliably make this memory allocation fail by commenting and uncommenting a line in this code:
    Copy code
    main:
      print "initializing display..."
      driver := S6d05a1 bus cs 320 320 --reset=reset 
      5.repeat:
        driver.draw-test-pattern
        sleep --ms=600
    f
    • 2
    • 35
  • Use jag to determine which version of a package is installed
    a

    addshore

    08/14/2025, 2:32 PM
    I have some docs that want to do copy paste instructions, and I dont want to update them every time a new version of a package is updated. It is somehting like
    Copy code
    sh
    mkdir my-x-project
    cd my-x-project
    jag pkg init
    jag pkg install github.com/x-io/toit-x
    then
    Copy code
    sh
    cp ./.packages/github.com/x-io/toit-x/v0.1.1/examples/eink.toit ./main.toit
    But I dont want to hardcode v0.1.1 Is there already a command I am missing that might say what is installed and being used by the project?
    f
    • 2
    • 10
  • IDE hinting enums, documentation etc
    a

    addshore

    08/21/2025, 11:06 AM
    As far as I can see, there is not enum support in toit. I have a function like this, there for example the
    sound-type
    field is actually an enum Whats the best way to document that fact? And or is there already IDE integreation and hinting for such as thing?
    Copy code
    /**
      Creates a protocol.Data object with all available fields for this message type.
      
      This is a comprehensive helper that accepts all possible fields.
      For method-specific usage, consider using the dedicated request/response methods.
      
      Returns: A protocol.Data object with the specified field values
      */
      static data --duration/int?=null --sound-type/int?=null --intensity/int?=null --run-count/int?=null --frequency/float?=null --base-data/protocol.Data?=protocol.Data -> protocol.Data:
        data := base-data
        if duration != null: data.add-data-uint DURATION duration
        if sound-type != null: data.add-data-uint SOUND-TYPE sound-type
        if intensity != null: data.add-data-uint INTENSITY intensity
        if run-count != null: data.add-data-uint RUN-COUNT run-count
        if frequency != null: data.add-data-float FREQUENCY frequency
        return data
    f
    • 2
    • 3
  • /toit/build/host/sdk/tools/firmware
    r

    Rikke

    08/22/2025, 6:32 AM
    What is the new location or command replacing /toit/build/host/sdk/tools/firmware?
    f
    • 2
    • 4
  • Migrating from Arduino IDE
    s

    Salamun Kawlam

    08/23/2025, 4:48 PM
    Hi, I’ve been using Arduino IDE for all my ESP32 projects because of the huge ecosystem, lots of tutorials, examples, and libraries make problem-solving easy. I wanted to try out Toit after seeing the wireless flashing and container based app like approac. But I couldn’t find many guides or examples for common protocols and use cases. I expected more from the official channel, but there seems to be very little. Is there any written documentation or a recommended way for someone coming from Arduino IDE to get started with Toit?
    f
    • 2
    • 6
  • Looping MALLOC_FAILED in jaguar
    a

    addshore

    09/05/2025, 4:58 PM
    I got this looping MALLOC_FAILED in jaguar today, while not really running anything else on the device
    Copy code
    [jaguar] WARN: running Jaguar failed due to 'MALLOC_FAILED' (2/3)
    [jaguar.http] INFO: running Jaguar device 'long-expert' (id: '736b8804-dcdf-4d96-890a-8785c1bfa31d') on 'http://192.168.68.50:9000'
    Heap report @ out of memory in primitive 3:4:
      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      β”‚   Bytes   β”‚  Count   β”‚  Type                                               β”‚
      β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
      β”‚    7400   β”‚    728   β”‚  heap overhead                                      β”‚
      β”‚  258064   β”‚    691   β”‚  untagged                                           β”‚
      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
      Total: 265464 bytes in 691 allocations (81%), largest free 44k, total free 62k
    [jaguar] WARN: running Jaguar failed due to 'MALLOC_FAILED' (3/3)
    [jaguar] INFO: backing off for 5s
    f
    • 2
    • 27
  • Dhtxx exception error
    u

    ~~boss~~

    09/08/2025, 4:05 AM
    Deadline exceeded
    f
    • 2
    • 59
  • Hangs in Bucket
    t

    tplux

    09/10/2025, 5:41 AM
    Hi guys I am experiencing an issue with the Bucket class. Usually it works fine, but in one case trying to access the bucket will hang the task accessing it. This happens when our device has lost its WiFi connection. It doesn't matter if I try to access a global Bucket object, a member of a class, or a local object. My next move is to make a centralized class that handles a Bucket object and thus hopefully minimize the Bucket activity. Can you see what can make the task hang like that?
    f
    k
    • 3
    • 10