https://toitlang.org/ logo
Join Discord
Powered by
# display
  • f

    floitsch

    04/05/2024, 12:32 PM
    I'm guessing it's a resistive touch display:

    https://i.stack.imgur.com/Js0FA.jpg▾

  • f

    floitsch

    04/05/2024, 12:37 PM
    Here is a datasheet for such a touch-screen: https://www.ti.com/lit/an/sbaa036/sbaa036.pdf
  • r

    RaspPi Parts

    04/05/2024, 5:17 PM
    Burr Brown is TI`s hi-end audio DAC! I recall I dreamt of having one.😚
  • d

    darlington4580

    07/23/2024, 4:03 PM
    Hello
  • d

    darlington4580

    07/23/2024, 4:08 PM
    Am facing a challenge with updating the display of my ESP32. I want to update the display text based on the distance of an ultrasonic sound. Currently the text just overwrites on top of the existing text. I need your help please
  • d

    darlington4580

    07/24/2024, 5:03 PM
    Hello
  • d

    Doğukan ÇAKAR - pyrosense

    08/15/2024, 11:03 AM
    Hello everyone, I am getting a certificate error when trying to use artemis. Is anyone else experiencing this?
  • k

    kasperl

    08/15/2024, 11:03 AM
    Which version of Artemis are you trying to use?
  • d

    Doğukan ÇAKAR - pyrosense

    08/15/2024, 11:04 AM
    v0.14.3
  • k

    kasperl

    08/15/2024, 11:05 AM
    Supabase, through their use of Cloudflare, recently changed their certificate, so we needed to update Artemis to support more certificates. You'll need to upgrade to a newer version. Sorry for the inconvenience!
  • k

    kasperl

    08/15/2024, 11:05 AM
    Try Artemis v0.23.0.
  • d

    Doğukan ÇAKAR - pyrosense

    08/15/2024, 11:06 AM
    thanks for answer 🥳 ı change to ver.0.23
  • k

    kasperl

    08/15/2024, 11:07 AM
    Artemis now embeds the most common certificates: https://github.com/toitware/toit-cert-roots/blob/59d138d9cb1ced78cb196a7a7e71731f2e4d0602/src/certificate_roots.toit#L11211.
  • d

    Doğukan ÇAKAR - pyrosense

    08/15/2024, 2:59 PM
    Even though I updated to v0.23.0, I still see version 0.14.3. What can I do about this?
  • k

    kasperl

    08/15/2024, 3:12 PM
    How did you update? You usually have to download a new Artemis CLI and then replace the old executable.
  • d

    Doğukan ÇAKAR - pyrosense

    08/15/2024, 5:37 PM
    I downloaded the .exe file for version 0.23.0 from github. Then I installed it.
  • k

    kasperl

    08/15/2024, 5:38 PM
    It feels like you have the old version somewhere in your PATH. Can you run
    which artemis
    in a terminal?
  • d

    Doğukan ÇAKAR - pyrosense

    08/15/2024, 5:42 PM
    When I run the "artemis version" code in visual studio, I see version 14.3. However, I removed the old version file in PATH.
  • f

    floitsch

    08/16/2024, 6:23 PM
    Can you try to run
    where artemis
    ? That should tell you where the old Artemis is found
  • d

    Doğukan ÇAKAR - pyrosense

    08/18/2024, 12:39 PM
    I deleted all the artemis files on the computer and ı install new ver.
  • d

    Doğukan ÇAKAR - pyrosense

    08/18/2024, 12:39 PM
    problem solved
  • m

    milkmansson

    07/14/2025, 10:49 PM
    Hey team, I'm just getting re-started on a couple of projects, I'm blown away by Toit, seriously!! My first focus was one requring an LED matrix display (one not unlike this: https://let-elektronik.dk/64x64-rgb-led-matrix-panel-3mm-pitch) Question to you all - are there some best suggestions/experiences about models/types/brands/products etc that are already Toit-supported/implemented that I should go and get?
  • f

    floitsch

    07/15/2025, 4:21 PM
    Depends a lot on the requirements you have. AZ delivery regularly has a sale on lower-resolution LED panels: https://www.az-delivery.de/en/collections/leds Their last sale on these was just 6 days ago: 1 LED panel (16x16) was for Eur 12 (and is now Eur 22). As I said: they do these sales relatively frequently. All these LED modules are just strips in a different configuration. Toit supports them with the
    pixel-strip
    package: https://pkg.toit.io/package/github.com%2Ftoitware%2Ftoit-pixel-strip
  • m

    MichaelK

    07/16/2025, 7:32 AM
    I need a function that translates a list of doubles to a ByteArray and back. Unfortunately, my old sources do not compile because the SDK has changed. Maybe https://github.com/toitlang/toit/ has examples of using Buffer, ByteArray & etc?
  • f

    floitsch

    07/16/2025, 7:48 AM
    What did you have before?
  • m

    MichaelK

    07/16/2025, 7:54 AM
    import binary show * import bytes show * F64 ::= 8 // https://github.com/toitlang/toit class FbRW : buffer_/Buffer := ? offset_/int := 0 constructor size/int : buffer_ = Buffer.with_initial_size size constructor.empty : buffer_ = Buffer constructor.BAP producer/ByteArrayProducer : buffer_ = Buffer buffer_.put_producer producer constructor.BA byte_array/ByteArray : producer := ByteArrayProducer byte_array buffer_ = Buffer buffer_.put_producer producer writeFloat float/float : offset := offset_reserved_ F64 buffer_.put_int64_big_endian offset float.bits writeListFloat list/List : len := list.size list.do : writeFloat it offset : return buffer_.size buffer : return buffer_.buffer_ offset_reserved_ size/int : offset := buffer_.size buffer_.grow size return offset clearBuffer : buffer_.clear clear : offset_ = 0 readFloat -> float : offset_ += F64 f64 := float.from_bits (BIG_ENDIAN.int64 buffer_.bytes offset_ - F64) return f64 readListFloat len/int -> List : result := [] for i := 0; i < len; i++ : value := readFloat result.add value return result main : print "kuku" // value := 1234.54 // byte_array/ByteArray := ByteArray 4
  • m

    MichaelK

    07/16/2025, 7:55 AM
    I've failed to compile FbRW class
  • f

    floitsch

    07/16/2025, 8:59 AM
    Have a look at https://libs.toit.io/io/class-Buffer You would replace the
    import binary
    and
    import bytes
    with
    import io show *
    . Then use
    Buffer.with-capacity
    (instead of
    with-initial-size
    ). The
    ByteArrayProducer
    has been deprecated or removed. If you can remove the constructor, that would make things easier. Otherwise you have to look at how it is used. The
    constructor.BA
    should probably just be
    buffer_ = Buffer byte-array --growable
    All the calls to
    buffer_.put_X_bigendian
    would become
    buffer_.big-endian.put-X
    . You might be able to simplify code by using the buffer's
    write-X
    functions.
  • m

    MichaelK

    07/17/2025, 7:24 AM
    Thanks for your help. I figured out the new SDK. By the way, it is much simpler than the previous version. Below is an example of creating and restoring a list compatible with Dart & Flutter. import io show * import encoding.base64 show * F64 ::= 8 class ListF64RWB : buffer_/Buffer := ? constructor : buffer_ = Buffer put list/List -> none : buffer_.clear list.do : buffer_.little-endian.write-float64 it print "buffer_.size->$buffer_.size" get -> List : result/List := [] size/int := buffer_.size / F64 for i := 0; i < size; i++ : value := buffer_.little-endian.float64 --at=i*F64 result.add value return result restoreList b_size/int -> List : result/List := [] size/int := buffer_.size / F64 size_x := min b_size size //print "getList [$size_x $b_size $size]" for i := 0; i < size_x; i++ : value := buffer_.little-endian.float64 --at=i*F64 result.add value return result getBase64Str -> string : byteArray/ByteArray := buffer_.backing-array print "getBase64Str.byteArray.size->$byteArray.size" base64str/string := encode byteArray return base64str putBase64Str base64str/string -> none : buffer_.clear byteArray/ByteArray := decode base64str print "putBase64Str.byteArray.size->$byteArray.size" for i := 0; i < byteArray.size; i++ : byte := byteArray[i] buffer_.write-byte byte main : rwbHub := ListF64RWB //list/List := [12.5, 23.5, 34.5, 45.5, 56.5, 67.5] list/List := [12.5, 23.5, 34.5, 45.5, 56.5, 67.5, 78.5, 89.5]; rwbHub.put list out/List := rwbHub.restoreList list.size // rwbHub.get print "out.size->$out.size" print "out->$out" b64str/string := rwbHub.getBase64Str print "$b64str" rwbHub.putBase64Str b64str clone/List := rwbHub.restoreList list.size // rwbHub.get print "clone.size->$clone.size" print "clone->$clone"
  • m

    MichaelK

    07/17/2025, 7:36 AM
    BTW, I've a suspicion that the encode function from encoding.base64 sometimes does not work quite correctly, because when restoring the list, additional zero elements appear in it. In my opinion, this depends on the size of the list. main : rwbHub := ListF64RWB list/List := [12.5, 23.5, 34.5, 45.5, 56.5, 67.5] rwbHub.put list out/List := rwbHub.get // rwbHub.get print "out.size->$out.size" print "out->$out" b64str/string := rwbHub.getBase64Str print "$b64str" rwbHub.putBase64Str b64str clone/List := rwbHub.get // rwbHub.get print "clone.size->$clone.size" print "clone->$clone" output: micrcx@micrcx-desktop:~/toit/binaries$ jag toit test_rwb.toit buffer_.size->48 out.size->6 out->[12.5, 23.5, 34.5, 45.5, 56.5, 67.5] getBase64Str.byteArray.size->64 AAAAAAAAKUAAAAAAAIA3QAAAAAAAQEFAAAAAAADARkAAAAAAAEBMQAAAAAAA4FBAAAAAAAAAAAAAAAAAAAAAAA== putBase64Str.byteArray.size->64 clone.size->8 clone->[12.5, 23.5, 34.5, 45.5, 56.5, 67.5, 0.0, 0.0]