Quick start guide

This guide shows how to sign up with Toit, install the Toit firmware on your ESP32, setup your local development environment, and finally how to deploy a Toit app on your ESP32 over-the-air.

1. Sign up

At toit.io, click the Start Now button to create a free Toit account.

2. Get an ESP32

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

3. Provision your ESP32

To install the latest Toit firmware on your ESP32, connect the ESP32 with a USB cable to your computer.

Go to the Serial page in the Toit console to initially provision your ESP32 with the Toit firmware and WiFi settings - note that it only works in Google Chrome and Microsoft Edge browsers.

Having issues? Get help in the troubleshoot section. (Note! You can also use the Toit CLI to provision.)

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.

When your device is online, all device communication will be over-the-air.

4. Run code

Run Toit code on your device from the Code tab of your device in the Toit console. Find more Toit code examples in Github.

5. Install Toit

Download and install the Toit development environment here.

6. Write and deploy a Toit app

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 as hello.toit
main:
  print "Hello, World!"

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

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 following command. Replace device-name with the actual name of your device.

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

Go to the Apps tab in the Toit console of your device to view the list of deployed apps.

7. View the logs from the device

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

8. Uninstall Toit app

Go to the Apps tab in the Toit console of your device to uninstall the app using the uninstall button.

9. What's next?

Congratulations! You are now ready to start developing IoT applications using Toit. Next step, look in the tutorials or dive into the Toit language guide.