This guide takes you from signing up for a Toit account, to install the Toit CLI locally and get an ESP32 microcontroller, and finally how to deploy a Toit app on your ESP32 or a simulated device.
Create a free Toit account to get access to the Toit cloud. Go to toit.io and follow the sign-up instructions.
Shortly after, you'll receive a welcome email with a link to set the password for your Toit account.
Next, install the Toit CLI which is used for preparing your ESP32 with Toit, and to deploy Toit apps. Download here.
On macOS and Linux, put the Toit CLI manually to PATH. If you need help, follow the step by step instructions here.
On Windows, the Toit CLI is automatically put on PATH by the installer.
You can buy an ESP32 here. If you already have one available, jump to step 4 to continue.
In the meantime, use the Toit playground or a simulated device to continue learning about the Toit platform. Start a new Toit simulator from the Toit console by clicking the "Start simulator" button, or run the following command in the Toit CLI:
Next, jump to step 5 to continue.
With your ESP32 ready for use, the first step is to initially provision your ESP32.
Connect the ESP32 with a USB cable to your computer where the Toit CLI is installed.
password with your own WiFi credentials and run the Toit CLI command:
You can either run a Toit program once on your ESP32 or deploy the same Toit program as a long-lived app.
First, save the following Toit code in a file named
To deploy the Toit program as a long-lived app, save the following yaml content in a file named
hello.yaml and place it next to the
hello.toit from above:
# Save as hello.yaml name: "HelloApp" entrypoint: hello.toit triggers: on_boot: true on_install: true
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.
Deploy the Toit app named
HelloApp on your device with the command:
When deploying an app, the device is not required to be online. The app will be installed on the device when it comes online.
Verify that the app has been deployed with the command:
or go to the Apps tab of your device to view the list of apps deployed.
View the logs from the device with
or go to the Logs tab of your device to view the logs from the application deployed.
As the last step, uninstall the Toit app from the device with the command
or go to the Apps tab of your device to uninstall the app.