1

I recently purchased Micro:Bit. I've seen that micro-python and bluetooth cannot be used at the same time due to memory capacity.

Does anyone know if I would be able to build a decent application using the javascript block programming?

The app basically has to do the following:

  1. Read data from acceleretometer.
  2. Acumulate some accelerometer data.
  3. Send the information to another device connected via bluetooth.
Lechucico
  • 1,914
  • 7
  • 27
  • 60

1 Answers1

1

Yes, you should be able to write a program for the microbit that does this. the official documentation describes the services that are available. I also found an example which suggests that there is an app which you can use at the phone end if that's relevant to your application.

The micropython restriction is a combination of the BLE protocol stack requiring 12 kB of RAM, and python being interpreted (so having a high RAM requirement). You can chose the block version or test javascript - and should be able to write reasonably complex programs (even if the text entry might be best done in an editor). As a final fall-back, you can fall back on C/C++ using the microbit DAL (which seems to be built on top of the mbed offline toolchain).

Sean Houlihane
  • 1,698
  • 16
  • 22
  • I’ve seen that if you use bluetooth you can’t program with micropython. I’ll be able to do this with javascript blocks? It has limitations? http://microbit-micropython.readthedocs.io/en/latest/ble.html – Lechucico Jan 19 '18 at 15:55
  • @Lechucico - no specific limitations - extended my answer a little. the SoC is designed for 'real' applications, and the javascript/DAL have a fairly small resource footprint on the device - code is compiled in the browser. – Sean Houlihane Jan 19 '18 at 16:09