Toit revolutionizes the IoT development process by offering a novel approach that fixes most of the issues inherent to the traditional process. Toit provides you with everything needed for developing an IoT application: firmware, cloud connectivity, a web-based console, and even a new programming language with syntax similar to Python but much faster execution speeds. This article presents some notable features of this all-in-one platform which help IoT developers to build their applications quickly and easily.
Deploy your First Application from Scratch within 15 Minutes
Toit provides a smooth onboarding process for developers who are new to this platform. First-time users need an ESP32 board and a USB cable to flash the firmware. This is a one-time process and future updates for the firmware will be done over the air. After signing up, the web-based console provides almost everything for getting started. Now with the support for flashing from the browser using Web serial, users can start developing even without installing anything on their PCs. This whole process of provisioning your device will take a few minutes and you’ll be up and running.
The console provides an inbuilt code editor where you can write, run code on your device and monitor the output with timestamps. This is a great way to quickly try out something and improve your program. Finally, when your program is working as expected, you can deploy it as a long-lived application on your device. If any, the output of the app will be logged and can be seen through the console under the LOGS section.
Efficient Multitasking on a $2 MCU
The multitasking capability of Toit is what makes it stand out from the crowd. On top of that, the isolated memory areas for each application put the icing on the cake. This way, the security of data is taken care of. Multitasking on an MCU with the traditional development process is not impossible but might easily break the whole system even if a small bug comes up. On Toit, it is a light and agile process, so users can easily try out new things without having to worry about bricking the device.
In fact, multiple applications run independently on the device. So, even if one of the apps goes down, the others won’t be affected and the system will keep running normally. Users can just fix the buggy app and re-deploy it as before.
Easy to Use Programming Language and APIs
Traditional IoT programming can be done using a lot of programming languages, with C/C++ and MicroPython being the popular ones. The problem here is that writing with low-level language might be painstaking when it comes to microcontrollers. On the other hand, high-level languages like MicroPython make it easy to write code but you’ll have to sacrifice the execution speeds. Toit decided to change everything by creating a new dedicated programming language for IoT. The Toit programming language has syntax similar to Python but is 20 times faster than MicroPython. This new language comes with an automatic memory management system which helps to avoid crashes.
Toit also provides a publicly available gRPC API allowing users to have complete control over their devices through a client application. As Toit engineers put it, “You are in full control of your devices and everything you can do with the Toit platform, you can do through our API. It is easy to integrate our platform into your products and turn your device fleet fully programmable.” The API definitions and examples are available on their Github repo.
Visual Studio Code Extension to Write and Deploy Apps
Syntax highlighting has become a necessity nowadays for writing any type of code. With the introduction of a new programming language, Toit released a VS code extension that does much more than just highlighting the code. Users can run code snippets, deploy apps and monitor the output in the inbuilt terminal. The extension also gives an overview of devices and apps running in the sidebar. So altogether, this VS code extension covers all the basic functionalities of the web-based console, while providing a few additional tools for app deployment.
Support for Raspberry Pi is available as a Beta Program
Apart from ESP32, Toit has now released a beta program for working on Raspberry Pi devices as well. Traditionally, Raspberry Pi IoT devices may require as much as 200 MB of code updates. With Toit, the updates are around 50 KB which takes less than 2 seconds to be installed. These updates are small enough to be sent across low-bandwidth cellular connections like NB-IoT or Cat-M1. Developers can also swap their Raspberry Pi with an ESP32 while keeping the same code stack. This way, Toit comes up as a hardware-independent IoT platform.
You can learn more about the Toit IoT platform and its features on their website.