11-03-2020, 11:17 AM (This post was last modified: 11-03-2020, 03:15 PM by J_Almer.)
Dear Sebastian and colleagues,
in the curriculum of bavaria we should characterize solar cells. So i was thinking of using the Micro:Bit as external sensor.
The Micro:Bit should measure the Rotation and the Voltage on Pin 0 and i would get ideally the sine wave.
I used your wonderful project of measuring voltage on Pin0 and this is working with Micro:Bit and PhyPhox. By using the Flashlight of the Smartphone, you just need some cable, a battery pack and the microbit (see attachement).
But the Micro:Bit has no Characteristic for the Rotation. So i thought of using Overview Characteristics.
With the attached programme i was able to receive the Rotation with BLExplorer (see screenshot), but i failed with PhyPhox.
I used also the formattedString BLE Wiki on PhyPhox, but here was the input in PhyPhox empty (no warning for a missing characteristic), but BLExplorer the values showed up (see attached screenshots)
Cool, love to see the BBC:Microbit being used like that. I was hoping to try it myself today, but am running out of time for today, so I will just tell you what I noticed without testing it:
The separator separator="";"" does not make sense. I assume that this was introduced by the editor because you used quotation marks around the semicolon. Instead you should just enter the ; without any quotation marks.
Besides that, your first try probably failed because there was no separation between the values at all (if I interpret your screenshot correctly) while I think that the second one should work without the quotation marks.
Well, in practice there always is another pitfall, so let me know if this helped and if it doesn't I will check with my own Microbit here.
i already tried and gave another try. Using separator ; without quotation marks didn't solve the problem.
It is working in BLExplorer but not in PhyPhox.
These Micro:Bits are so exciting, because we can use Physical Computing in year 7 and afterwards this would be a perfect data aquisition for solar cell characterisation.
The UART service would be nice especially for students (i would use label), so students can calculate, gather, and send data with blocks in Makecode without changing the bluetooth interface from PhyPhox.
I got it to work, but this topic really hit every single little problem you could imagine.
First of all, this is the very first Bluetooth device that I found to use "indication" instead of "notification". In the future, phyphox will autodetect which it is, so you do not have to change anything about this now, but the implementation of "indication" was broken on both Android and iOS. In principle, your phyphox-file is absolutely correct, but depending on which phones there are available to you, you need a different workaround until the next phyphox version is released:
Android
Unfortunately, in the current version indications do not work at all. If you need Android-support soon (i.e. students should use it or you do not have an iPhone available for development), let me know and I will try to get a new beta version ready soon.
iOS
Indications work even the file is set to notification (i.e. as it is right now), but there is yet another bug that you will encounter here: At the moment that last value in "formattedString" cannot be parsed if there is no terminating separation character. In other words: Simply add another ";" after the last value in your Microbit sketch and it should work with your current phyphox file on the current iPhone version.
I am about to release a public beta test for Android, which will include the fix along with new MQTT support (not related to this question). When I get around to implement MQTT (that's why I mention it) for iOS, I will also release an iPhone beta version that also fixes the semicolon-at-the-end problem and that accepts "indication" as well as "notification" (probably not important for you if you add that last semicolon and set the mode to notification).
I will answer your PM shortly when the beta is ready.
(11-09-2020, 05:06 PM)Sebastian Staacks Wrote: I am about to release a public beta test for Android, which will include the fix along with new MQTT support (not related to this question). When I get around to implement MQTT (that's why I mention it) for iOS, I will also release an iPhone beta version that also fixes the semicolon-at-the-end problem and that accepts "indication" as well as "notification" (probably not important for you if you add that last semicolon and set the mode to notification).
I will answer your PM shortly when the beta is ready.
Dear Sebastian,
i tried with the public beta (I hope it is the right version) and changed the value to indication, but still i can't see any values. With BLExporer the values appear.
Now that is weird. With the recent beta (indeed 1.1.7-beta2) and scanning the QR code from your attachment it is working for me... Do you have a particulary old phone or anything else that is unusual? Could you post the device info from the main menu? Maybe, could you try resetting the Microbit and re-pair it to your phone? (I am wondering if there could be a not entirely closed connection from BLExplorer? Not familiar with this app.)
(BTW: You can now set indication or notification as phyphox now autodetects which it is.)
(11-18-2020, 05:22 PM)Sebastian Staacks Wrote: Now that is weird. With the recent beta (indeed 1.1.7-beta2) and scanning the QR code from your attachment it is working for me... Do you have a particulary old phone or anything else that is unusual? Could you post the device info from the main menu? Maybe, could you try resetting the Microbit and re-pair it to your phone? (I am wondering if there could be a not entirely closed connection from BLExplorer? Not familiar with this app.)
(BTW: You can now set indication or notification as phyphox now autodetects which it is.)
Dear Sebastian,
i just went to school to test with our Ipads and the same programme on the MicroBit (although the same) and within PhyPhox is working just fine. I closed the App BLExplorer for testing.