Quick Start

This guide will show you how to get a Toit account, install the Toit CLI locally, prepare your ESP32 microcontroller with the Toit firmware, and finally how to deploy a Toit app on your ESP32.

1. Sign up

Create a free Toit account to get access to the Toit cloud. Go to toit.io and follow the sign-up instructions.

2. Install Toit

Next, install the Toit CLI which is used to prepare 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.

3. Get an ESP32

You can buy an ESP32 here. If you already have one available, jump to step 4 to continue.

Don't have an ESP32 yet?

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:

toit simulator start

Next, jump to step 5 to continue.

4. Provision your ESP32

With your ESP32 ready for use, the first step is to initially provision your ESP32 with the Toit firmware and settings.

Connect the ESP32 with a USB cable to your computer.

Go to the Serial menu in the web-based Toit console to initially provision your hardware.

A detailed description of using Web Serial can be found here.

Note that Web Serial only works in Google Chrome and Microsoft Edge browsers.

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.

If there were errors, please consult the detailed descriptions in the provision page or get help in the troubleshooting page.

5. Deploy Toit app

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 hello.toit

// Save as hello.toit
  print "Hello, World!"

To deploy the Toit program as a long-lived app, save the following yaml content 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
  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 hello.yaml. 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:

toit deploy -d <device-name> hello.yaml

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:

toit device -d <device-name> ps

or go to the apps tab in the Toit console of your device to view the list of deployed apps.

View the logs from the device with

toit device -d <device-name> logs -f 10m

or go to the Logs tab in the Toit console of your device to view the logs from the device.

6. Uninstall Toit app

As the last step, uninstall the Toit app from the device with the command

toit device -d <device-name> uninstall HelloApp

or go to the Apps tab in the Toit console of your device to uninstall the app.

7. What's next?

Congratulations! You are now ready to start developing IoT apps with Toit.

As the next steps, have a look at the Toit tutorials with examples you can run on your ESP32, or dive into the Toit language guide, or view the list of available drivers.