woody
02/23/2025, 11:02 AMjag flash esp32s3-spiram-octo
, I'm using SDK version: v2.0.0-alpha.174.
I tried to get the RGB LED running with this program:
import pixel-strip
import gpio
main:
rgb-pin := gpio.Pin 38 --output=true
// while true:
// // sleep --ms=0 => 40 µs
// // sleep --ms=1..9 => 10ms
// // sleep --ms=10..x => 20ms..10+x
// rgb-pin.set 1
// sleep --ms=1
// rgb-pin.set 0
// sleep --ms=1
rgb := pixel-strip.PixelStrip.uart 1 --pin=rgb-pin --invert-pin=false
while true:
rgb.output #[0xff] #[0xff] #[0xff]
print "white"
sleep --ms=1000
rgb.output #[0xff] #[0] #[0]
print "red"
sleep --ms=1000
rgb.output #[0] #[0xff] #[0]
print "green"
sleep --ms=1000
rgb.output #[0] #[0] #[0xff]
print "blue"
sleep --ms=1000
Program compiled and downloaded fine, but on the LED nothing happened. I measured Pin 38 with an Oscilloscope an it stay permanently low. What do I miss in my program? Or is the package buggy?mvdlande
02/23/2025, 1:43 PMjag
, device has version
******************************************************************************
EXCEPTION error.
FAILED: 400 - Could not find the 'device-id' column of 'temperatures' in the schema cache
0: Client.request_ \supabase.toit:290:7
1: PostgRest.insert \supabase.toit:422:25
2: main database.toit:21:15
******************************************************************************
In subabase I also see an error:
POST 400 /rest/v1/temperatures
No query parameters in this request
I have also changed the supabase library to toit-supabase@0.3 and modified the demo code accordingly
...
uri := "https://$(PROJECT-ID).supabase.co"
client := supabase.Client
--uri=uri
--anon=ANON-KEY
...
But the error remains.
Has anybody seen this error before? What can i do to resolve this?
Regards, Maurits😀
https://cdn.discordapp.com/attachments/1343216544230146089/1343216545102430288/subabase_error.jpg?ex=67bc7764&is=67bb25e4&hm=de8e79f2d1445708100d8924579ea4cd8d43b223093ffa056490d919969701eb&Spruiid
02/26/2025, 1:25 PMAbedN
02/26/2025, 2:00 PMjag
, device has version
******************************************************************************
EXCEPTION error.
UNKNOWN ERROR 0xffffffff(-1)
0: i2c-init_ /i2c.toit:324:3
1: Bus /i2c.toit:58:12
2: LBI2CDevice /devices/i2c.toit:14:10
3: RH2.I2C-DEVICE /devices/rh2.toit:10:24
4: run-global-initializer__. /core/objects.toit:291:28
5: run-global-initializer__ /core/objects.toit:257:1
6: RH2.I2C-WRITER /devices/rh2.toit:12:31
7: run-global-initializer__. /core/objects.toit:291:28
8: run-global-initializer__ /core/objects.toit:257:1
9: RH2.out /devices/rh2.toit:16:12
10: Comms.sendSwitching_ /services/comms.toit:265:15
11: Comms.send /services/comms.toit:246:5
12: main echo.toit:48:8
******************************************************************************
[jaguar] ERROR: program 3e919e89-5ded-63a7-c1df-5f8a8ed7ae4d stopped - exit code 1)
is there a way to go around this without having to move all i2c communication tasks to either side of the stack?addshore
02/26/2025, 3:12 PMtasks := []
tasks.add (task (:: log.info "foo")
tasks.add (task (:: do.something "else")
tasks.do: |t| t.wait
log.info "all done"
But I believe this isn't doing what I'd expect.
Is there a way to wait for a collection of actions such as tasks in this way?addshore
03/04/2025, 6:54 AM-D jag.disabled -D jag.timeout=16h
, however if it crashes or restarts jag seems to come back.
Is there a way to prevent this?crockedile
03/10/2025, 12:37 PMkaxori
03/14/2025, 11:06 AMEXCEPTION error.
ALREADY_IN_USE
0: gpio-use_ <sdk>\gpio\gpio.toit:855:5
The Toit DHTxx package uses RMT-devices.
ESP32 shout provide 8 RMT channels.
Is it possible to use more than 4 devices on an ESP32-Wroom ?AbedN
03/17/2025, 7:32 AMaddshore
03/18/2025, 10:11 AM#ifdef FOO_BAR
doStuff();
#endif
Is there a similar way to do this sort of thing with toit?
The primary usecase for me would be to entirely avoid building verbose log lines, which in their call might create long strings etc, when there is no expectaiton for that log line to every be used?
The only alternative right now I guess would be commenting and un commenting lines continually?Rikke
03/18/2025, 11:20 AMi2s_bus = i2s.Bus --tx=pin --sample_rate=100_000 --bits_per_sample=32 --buffer_size=(buf.size + reset.size) --use-apll=false
to
i2s_bus = i2s.Bus
--master=true
--mclk=null
--tx=pin
--sck=null
--ws=null
i2s_bus.configure
--sample_rate=100_000
--bits_per_sample=32
i2s_bus.start
But in 1 out of 20 reboots(ish) I get a panic when starting up the i2s:
Guru Meditation Error: Core 1 panic'ed (Cache disabled but cached memory region accessed).
Core 1 register dump:
PC : 0x400d5904 PS : 0x00060035 A0 : 0x80088c96 A1 : 0x3ffb2b50
A2 : 0x3ffd48e8 A3 : 0x3ffb2b70 A4 : 0x3ffd4810 A5 : 0x3ffaf960
A6 : 0x00000003 A7 : 0x00060723 A8 : 0x80080eef A9 : 0x00060923
A10 : 0x3ffd4810 A11 : 0x00000002 A12 : 0x00000000 A13 : 0x3ffb4484
A14 : 0x00000001 A15 : 0x3ffafa84 SAR : 0x00000001 EXCCAUSE: 0x00000007
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
*******************************************
Decoding by `jag`, device has version <2.0.0-alpha.175>
*******************************************
Crash in native code:
Backtrace: 0x400d5901:0x3ffb2b50 0x40088c93:0x3ffb2b70 0x40087079:0x3ffb2bb0 0x40089b39:0x3ffb2bd0 0x4008544a:0x3ffaf9b0 0x4008558b:0x3ffaf9d0
0x400d5901: toit::primitive_toit_callback_deinit(toit::Process*, toit::Object**) + 0x15
0x40088c93: i2s_dma_rx_callback + 0x8b
0x40087079: esp_random + 0x15
0x40089b39: interrupt_hlevel_restore + 0x11
0x4008544a: spi_flash_disable_cache$constprop$0 + 0x6
0x4008558b: spi_flash_guard_set + 0x3
*******************************************
I am using i2s_bus.write
to write to the pin. It works fine most of the time, but am I starting up the I2S too early?addshore
03/21/2025, 11:24 AMkaxori
03/25/2025, 3:14 PMmap := {
"simple":"value",
"nested":
{
"A":1,
"B":2
}
}
addshore
03/26/2025, 3:06 PM~/dev/github/toitlang/jaguar (main) make
rm -f /home/adam/dev/github/toitlang/jaguar/build/sdk.build
make -C /home/adam/dev/github/toitlang/jaguar/../toit version-file esp32
make[1]: Entering directory '/home/adam/dev/github/toitlang/toit'
make rebuild-cmake
make[2]: Entering directory '/home/adam/dev/github/toitlang/toit'
mkdir -p build/host
(cd build/host && cmake /home/adam/dev/github/toitlang/toit -G Ninja -DHOST_TOIT=/home/adam/dev/github/toitlang/toit/build/host/sdk/bin/toit -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/home/adam/dev/github/toitlang/toit/toolchains/host.cmake --no-warn-unused-cli)
Not searching for unused variables given on the command line.
CMake Error at tools/gitversion.cmake:135 (message):
Couldn't determine merge-base for upstream/release-v1.6 and origin/master
Call Stack (most recent call first):
tools/gitversion.cmake:155 (common_ancestor)
CMakeLists.txt:57 (compute_git_version)
-- Configuring incomplete, errors occurred!
See also "/home/adam/dev/github/toitlang/toit/build/host/CMakeFiles/CMakeOutput.log".
make[2]: *** [Makefile:138: rebuild-cmake] Error 1
make[2]: Leaving directory '/home/adam/dev/github/toitlang/toit'
make[1]: *** [Makefile:114: build/host/CMakeCache.txt] Error 2
make[1]: Leaving directory '/home/adam/dev/github/toitlang/toit'
make: *** [Makefile:87: /home/adam/dev/github/toitlang/jaguar/build/sdk.build] Error 2
addshore
03/27/2025, 9:30 AM[watchdog] ERROR: watchdog too late {id: lightbug/otl/link}
[toit] INFO: entering deep sleep for 50ms
Error: Port has been closed
~/dev/lb/io/toit (main) jag monitor --attach
Starting serial monitor of port '/dev/ttyACM0' ...
What (if anything) am I doing wrong?pkarsy
03/30/2025, 6:17 PMFernan
04/12/2025, 9:24 PMaddshore
04/14/2025, 9:37 AMaddshore
04/16/2025, 11:01 AMconstructor action/Lambda --then/Lambda?=null:
But I would want to be able to call it with multiple named arguments
Such as
foo --then=(::print foo) --then=(::print bar)
However this isn't possible in toit, what would the closest thing be?
Or is there an example of fluid / chained function callsinneos
04/17/2025, 3:16 PMkaxori
04/21/2025, 4:04 PMaddshore
04/22/2025, 3:59 PMaddshore
04/23/2025, 7:15 AMArubinu
04/25/2025, 7:29 PM(gpio.Pin MY_PIN).do:
, I don't get reliable results.
But I suspect the issue comes from how .do:
behaves inside a task, since it appears to be blocking...Arubinu
04/28/2025, 3:44 PMArubinu
04/28/2025, 7:23 PMArubinu
05/01/2025, 1:35 PMcpp
/**
* @fn float ** merci(int*, double**,char*,int)
* @param \b param1
* @param \b param2
* @param \b param3
* @param \b param4
* @brief votre briefing concernant la fonction
* @details les détails de la fonction
* @return ce qu'elle retourne
*/
bpmct
05/03/2025, 10:48 PMbpmct
05/04/2025, 3:29 PMjag flash --port /dev/cu.usbmodem2101
but it otherwise does not show up on jag port
, jag flash
, or jag monitor
.
I am also finding cases where it lets me manually specify the port with jag flash
, but jag monitor
isn't able to pick it up... Any ideas? I'm using an esp32s3 and this version:
➜ toit-zygote git:(fixes) ✗ jag version
Version: v1.50.3
SDK version: v2.0.0-alpha.179
Build date: 2025-04-01T08:09:19Z
bpmct
05/05/2025, 9:34 PMmax-offline
to a very long number. However, I'm not sure if artemis has the built-in capability to query whether something is on or off, besides looking at events
.
Is there a REST API I should be programmatically querying, or should I be sending health to artemis via events, or using an external backend to keep track of devices and health?
Thanks!