Toit
#Getting device id?
Thread channel in help
AmusedGrape
03/28/2024 03:19 PM
Is there a way to get the current device's ID, without manually setting it?
floitsch
03/28/2024 03:20 PM
I'm pretty sure there is.
Give me a second to check.
floitsch
03/28/2024 03:21 PM
Hmm. I'm not sure if the ID isn't Jaguar or Artemis specific.
floitsch
03/28/2024 03:21 PM
Which platform do you use?
floitsch
03/28/2024 03:26 PM
I don't see an easy way for Jaguar, but Artemis has the
artemis
package which exposes it.
floitsch
03/28/2024 03:26 PM
https://pkg.toit.io/github.com/toitware/
[email protected]
/docs/artemis/class-Device#id(0%2C0%2C0%2C
)
floitsch
03/28/2024 03:27 PM
After installing the package it's just:
import artemis main: print artemis.device.d
(Untested).
AmusedGrape
03/28/2024 03:47 PM
Ah perfect, yeah using artemis. I’ll take a look. Thanks!
1
8 messages in total