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. Get an ESP32
If you already have an ESP32 available, jump to step 2 to continue. Otherwise, you can buy one at digikey, or any other electronics distributor. Any board that contains a standard ESP32 chip (like the WROOM or WROVER) should be fine. If you have doubts, don't hesitate to ask for guidance on our Discord channel.
2. Install Jaguar
The following describes how to install a precompiled version of Jaguar, including a prebuilt ROM image that is suitable for most ESP32s. If you need to build from source, see the instructions at Github.
On Windows 10+ simply open powershell, and run:
For older Windows versions, download and install Jaguar from here.
Run the command jag setup
after installation to finish the setup of Jaguar. This step downloads
the Toit SDK and an ESP32 image.
3. Flash
Connect your ESP32 to a USB port and run jag flash
.
(On Linux this may fail with a permissions issue.)
Having issues? Get help in the troubleshoot section, or contact us in our Discord channel channel. We have some experience with flashing, and are happy to help.
4. Run code
Create a file hello.toit
with the following content:
Run it with jag run hello.toit
.
At this stage you won't see anything, as the output is emitted to the serial output (normally connected to your computer via USB).
Use jag monitor --attach
to start listening to the serial output. The --attach
flag
is to make sure we don't reboot the device.
You should start seeing the "Hello, World!" messages printed out.
5. Install a container
With jag run
a program is only run once, and disappears when the device is rebooted.
Use jag container install hello hello.toit
to install the program as a container. After this the
program will be rerun every time the device reboots.
6. Install Visual Studio Code
Toit comes with a Visual Studio Code extension, which significantly improves development of Toit code.
Install Visual Studio Code first. Then open the extensions menu and search for "Toit".
7. 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.