For questions regarding programming in Toit and using Toitware's end-to-end platform for network-connected, embedded devices and the internet of things.
Questions tagged [toit]
52 questions
0
votes
1 answer
How can I make provision on a port other than ttyUSB0?
In the case of provisioning, the port is means /dev/tty? How should the "toit serial provision..." command look like if you need to use not the standard, as I understand it, ttyUSB0 port, but, for example, ttyACM0?
Naturally, I can use the Toit…

Michael Kanzieper
- 709
- 1
- 10
- 20
0
votes
2 answers
Using Pin 26 for ADC?
Using pin 26 for ADC seems to be discouraged in Toit.
From what I can see on https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/adc.html pin 26 should have an ADC converter, so what is the reason for that?

Florian Loitsch
- 7,698
- 25
- 30
0
votes
1 answer
Saving data to the cloud
The Toit documentation indicates that one of the advantages of the system is the simplicity and reliability of saving data received by the application from the sensors & etc on the cloud. There is even a special SDK for this. True, I did not find…

Michael Kanzieper
- 709
- 1
- 10
- 20
0
votes
1 answer
File system in Toit
Judging by the lib_v1.0.2 library, access to the file system is implemented in Toit. May be can give some simple examples, which would include:
Create a file,
Writing data to file,
Reading data from a file,
Deleting a file,
Is there support for…

Michael Kanzieper
- 709
- 1
- 10
- 20
0
votes
1 answer
Provision: how to set the device name?
20 days ago I've successfully provisioned for ESP-32 and work fine with this device.
Today I've successfully provisioned the second ESP-32 chip on another computer:
5.40 MiB / 5.40 MiB [------------------------------------] 100.00% 14.69 MiB…

Michael Kanzieper
- 709
- 1
- 10
- 20
0
votes
1 answer
Time zones in toit
I noticed a certain oddity of local time. My app prints the log using the time class:
time: = Time.now.local
If run app with the toit execute ... command, the following trace appears on the console:
micrcx@micrcx-desktop:~/toit_apps/Hsm2/tests$…

Michael Kanzieper
- 709
- 1
- 10
- 20
0
votes
1 answer
Cannot receive data from stream
I'm acting according to the recommendation because this error regularly appears when running toit at the very end of the app execution over the past few days on April 22, 23 as a free addition. But the app is performed normally, judging by the…

Michael Kanzieper
- 709
- 1
- 10
- 20
0
votes
1 answer
Clarification is needed on the use of the Time class
The Time class allows to get the standard time parameters up to sec:
main :
time := Time.now.local
print "Time: $(%02d time.h):$(%02d time.m):$(%02d time.s) $(time.ns)"
print "Date: $(%04d time.year)-$(%02d time.month)-$(%02d…

Michael Kanzieper
- 709
- 1
- 10
- 20
0
votes
1 answer
Task management
Few questions about tasks:
In all examples (Tasks in Toit section) tasks are "created" in the main section of app. Does this mean that tasks cannot be created in the class? I tried this and got a compilation error:
class Receiver :
task…

Michael Kanzieper
- 709
- 1
- 10
- 20
0
votes
1 answer
Find device from serial info
I have a device that I can't find in the web-console.
Is there a way to find the device in the web-console given the toit serial info output?
I currently have:
ᐅ toit serial info
{
"name":…

Florian Loitsch
- 7,698
- 25
- 30
0
votes
1 answer
Including modules using operator import
I've read the "Package tutorial" section and, to be honest and frank, I didn't understand much. But I know exactly what I want to get.
I've two files, bs_func.toit, which contains the binary_search function, and bs_test.toit, which uses this…

Michael Kanzieper
- 709
- 1
- 10
- 20
0
votes
1 answer
How do I reset unacknowledged messages in PubSub?
The PubSub tab of the console shows that there is a message that wasn't acknowledged (probably answering my question on whether one needs to acknowledge pubsub messages: Do I need to consume pubsub messages?).
How do I reset the unacknowledged…

Florian Loitsch
- 7,698
- 25
- 30
0
votes
1 answer
Do I need to consume pubsub messages?
I want to react on pubsub messages from the cloud.
However, I don't care for the content of the message. It's just used as a trigger. I would just go ahead and write an app yaml file that uses the trigger to launch my entry point.
Do I still need to…

Florian Loitsch
- 7,698
- 25
- 30
0
votes
2 answers
Access Toit APIs and PubSub from browser
The documentation of the Toit APIs and PubSub states that the console APIs and PubSub are available through "gRPC API"s.
Is there a way to also access them through the browser? (maybe with web-grpc or just REST APIs)

Florian Loitsch
- 7,698
- 25
- 30
0
votes
1 answer
Instance of class Location with fake data
In order to fake data for my API, I need to be able to instantiate a Location object with values that I choose. The Location object works, when I let the toitbox build the Location object by using GPS. I tried the following:
import location show…

Jacob Qvist
- 13
- 3