Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Synchronization of SensorTags
-
Hi I wanted to ask if there is a possibility to synchronize a Bluetooth connection with multiple Sensortags?
The data are received by the Pythonista on the smartphone and since you switch the sensortags one after the other, you have a different amount of data for each sensortag. Do you know if it is possible to manage it directly via the Pythonista app?I was checking the cb library for a flag that maybe signalizes the connection of nodes.
-
The tricky part of this is that pythonista does not pass all of the identifying info to all of the callbacks. You can sort of manage this yourself, by only sending one request at a time and manually keeping track of which device you are querying. There was a thread on here on how to do it. But it ends up being pretty delicate if devices are disconnecting, or don't respond, etc.
-
Thank you for the information. Can you tell me the URL of the thread?
Okay, so it means it is complex to realize it. The problem is that I would like to handle 3 Sensortags and the Smartphone is receiving the sensor data from all of them. It is not nice when at the end STK1 has 20 datasets, STK2 10 and the 3 one only 5 datasets. So I thought about it, but it seems to be quite complex.
I tried to work with the peripheral.status, but at the moment, I does not work :(
-
-
Hi, is there may be the possibility that the pythonista app on the smartphone is firstly configuring the time of the incoming sensor tag and after that the smartphone can receive the sensor data? I gave a look in the modules available but, I did not find anything. In other words, I could maybe use the Network Time Protocol (NTP). Or do you have an idea that is easier to realize?
-
You can get the time using time module.for instance time.ctime() or time.time() or time.asctime(), etc, depending on the desired format.
-
Hi thank you so much, I need a resolution to milliseconds.
Want I want to do is receive the timestamp of the sensortags on the smartphone via Pythonista, configure it (synchronize) and set it back to the sensortags. After that sensortags receive it, the tags should send the values to smartphone. -
@ProgrammingGo does the sensortag let you set the clock or sampling time? I looked at the API and it didn't seem like the default firmware did that, though of course you can always write tour own.
-
@ProgrammingGo As I requested some months ago, can you please consider setting up a GitHub (or similar) repo with your code in it. It is much easier to debug Python code than English prose.
-
@JonB yes I am able to set up a timestamp, you need to add the functionality to the firmware. So I am able to label all the sensor data with a timestamp. In which URL did you check up the API?