Toit is a modern high-level language designed specifically for microcontrollers
Toit is optimised for live reloading on your microcontroller. Your code runs incrementally as you write it and you get instant feedback. Push changes over your local WiFi in two seconds and reserve your USB cable for charging your phone. You iterate quickly, learn fast, and build better things.
Hello, world!
Everyone likes to start with a simple program, so here is the obligatory "Hello, world!" program in Toit. Define your main function by writing its name, followed by a colon. The body of the function is indented by two spaces. The "print" function takes one argument - you don't need parentheses.
Learn more...main:
print "Hello, World!"
Toit + Jaguar = 🥳
Jaguar is a small application developed by the Toit team, that runs on your ESP32. It enables live reloading and lets you update and restart your ESP32 code over WiFi.
Update your code and restart your ESP32 conveniently over WiFi. No need to flash over serial, reboot your device, or wait for it to reconnect to your network.
Change your code in your editor, update it on your device, and restart it all within seconds.
Updates contain compiled Toit programs that are relocated and installed in flash on the device. Old versions are stopped and their resources are freed automatically.
No ESP32?
The Toit language can also be used on the desktop. In fact, we use it to develop many of the tools that come with the SDK.
Documentation
Learn how to code with Toit and how you can use it in your IoT projects.
Latest news
Toit v2.0.0-alpha.176 release Mar. 19th, 2025
Always bubble up BLE scan responses on macOS. Scan infinitely without a scan-duration on macOS. Use more of the default sdkconfig for LWIP. Fix break-length for io.Data and implement break receiving. Report lost UART data. Support password-less Soft AP. Rewrite pulse-counter driver. Allow to connect to TLS without certificate verification. Add missing IRAM_ATTR in I2S code. Update to esp-idf to cherry-pick for i2c and i2s fixes. Update Ubuntu builders to 22.04.
Toit v2.0.0-alpha.175 release Feb. 27th, 2025
Add more documentation to 'ble.scan'. Add Map.map examples. Add return type to to-string-non-throwing. Add more TLS documentation. Add support for stringifying/printing unsigned int64s. Report OOM errors in NimBLE callbacks. Refactor the ADC to use the new API. Use the new I2S API and add tests. Sign Windows executables with new action. Fix documentation for ethernet boards. Fix PWM for ESP variants. Fix comment in byte-order.int64. Fix i2c for empty data and external memory.
Toit v2.0.0-alpha.174 release Dec. 10th, 2024
Allow passing --dependency-file to 'toit analyze'. Add esp32s2 GPIO documentation. Add support for raw BLE data blocks. Add information about the Lilygo T-Internet-COM. Fix locking in heap support for esp32c6.
Toit v2.0.0-alpha.173 release Dec. 6th, 2024
Upgrade to esp-idf v5.3.1. Check rodata reservation size when booting. Add preliminary esp32c6 support.
Toit v2.0.0-alpha.172 release Dec. 6th, 2024
Fix flash cache synchronization regression in esp-idf.
Toit v2.0.0-alpha.171 release Nov. 29th, 2024
Upgrade to esp-idf 5.1. Enable link-time optimizations.
Writing a driver in Toit
Just a few lines of Toit code are needed to reap the full benefits of the Toit ecosystem — without having to rely on firmware developers.
Choosing Toit for your IoT project means that your ESP32-based devices become as easy to program as smartphones: develop your app, deploy it to the devices of your choice, and then update and reinstall as often as needed, even on a shaky connection — all that while the other apps on the device keep running. Welcome to the 21st century, IoT!
Toit meets Visual Studio Code
The extension allows VSCode to provide a rich view of your programs as well as easy access to common functionality like running and deploying apps.