micro bit radio #7181
Replies: 1 comment
-
Posted at 2017-03-29 by @gfwilliams Hi Andy, You access the radio using the There's a bit of background on BLE here: http://www.espruino.com/About+Bluetooth+LE Basically the MS editor massively simplifies what BLE can actually do (although the micro:bit can't access other devices as a 'central' - it can only be connected to by something like a phone/PC). By default, the Micro:bit will put the console (the LHS of the Web IDE) on Bluetooth when it's connected, so if you want to make something happen you can actually just send the JS code If you want to do something like the MS example, you can just do this:
Otherwise you can use Posted at 2017-03-30 by AndyS I am likely wrong here - but I'm trying to NOT use the full BLE stack. i.e. I'm looking to have two microbits communicate with each other, without having to pair them. I tried your suggestion - but it didn't work - I think this is because I'm looking to have two microbits communicating without a 'central' PC. Am I barking up the wrong tree - or is this something Espruino can do - i.e. radio comms without pairing. I do have this working in uPython now - but I would prefer to use Espruino - if possible. Best wishes Posted at 2017-04-01 by @gfwilliams Ahh, ok - Micro Python doesn't actually use Bluetooth as far as I know - it's just a proprietary radio transmission because they couldn't fit the BLE stack and micro python in the micro:bit. With Espruino on micro:bit you have to use BLE, you can't do proprietary radio. However you can use BLE to transmit data in a standard BLE way by sending 'advertising data' and then scanning for it with the other micro:bit. Again, check out the BLE page linked above. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-03-29 by AndyS
Hello Everyone
Gordon has already kindly pointed me in the direction of more documentation. Unfortunately, I'm not an Espruino person - so I'm missing a lot of the background knowledge - so the Espruino radio api doesn't mean anything to me.
Does anyone whether it is possible, or how, to access the radio from Espruino. As a example, I have a simple javascript (written for the blockly...microsoft editor) that follows:
N.B. I know this won't work in Espruino...
Any hints, tips, tutorials or pointers to documentation would be very welcome.
Best wishes
Andy Stratton
Beta Was this translation helpful? Give feedback.
All reactions