This guide will show you how to sign up with Toit, setup your local development environment, install the Toit firmware on your ESP32 , and finally how to deploy a Toit app on your ESP32.
At toit.io, click the Start Now button to create a free Toit account.
Download and install the Toit development environment from here.
If you already have an ESP32 available, jump to step 4 to continue.
Otherwise, you can buy one here.
To install the latest Toit firmware on your ESP32, connect the ESP32 with a USB cable to your computer.
At the end of the provisioning process, you will receive the name of the device, and a URL to view the device in the Toit console. When your device is online, all device communication will be over-the-air.
Your device has now been added to your Toit project. Only users with access to the same Toit project can communicate with the device via the Toit cloud.
You can either run a Toit program once on your ESP32 or deploy the same Toit program as a long-lived application.
First, create a project folder and save the following Toit code in a file named
hello.toit using Visual Studio Code.
Save the following yaml code in a file named
hello.yaml and place it in the same folder as the
hello.toit file from above:
# Save as hello.yaml name: "HelloApp" entrypoint: hello.toit triggers: on_boot: true on_install: true
Note! Install the Toit extension for Visual Studio Code for better language support.
Find more Toit code examples here.
Deploying a Toit app on your device means that the Toit code in the
toit file will be executed repeatedly according to the scheduling defined in
In this case, when the app is installed on the device and if the device reboots.
When deploying an app, the device is not required to be online. The app will be installed on the device when it comes online.
Uninstall the Toit app from the device: