4

My project is to create an interactive program using the Micro:bit microprocessor I'm building a game which uses a drill motor as a controller of sorts reading the rotation direction and speed as inputs for control but my mentor also said it would be cool to power the board at the same time as the game is running so now I hit the situation where once I stop turning to change direction or my speed goes below transmitting 3.3 volts to power it then the game restarts and I lose all progress

I had the Idea of using a second micro:bit as a sort of storage place being powered by my computer and the two continuously communicating sending back player position and other objects on the LED's

but i can't figure out how to get the two Micro:bit's to talk to each other

If someone could just point me in the right direction or even set up some sort of communication to nudge me in the right direction as I start moving forward

i'm a high school student who doesn't know as much as I pretend to so I'll probably need a lot of help (i am more advanced then most in my class at this sort of thing so think of me as a tech gifted teenager thrown in with college students losing my undeserved ego day by day LOL) please help me somehow I'm currently completely lost

rdmueller
  • 10,742
  • 10
  • 69
  • 126
  • 1
    Hi! Just wanted to inform about a proposal for a dedicated SO site for micro:bit: http://area51.stackexchange.com/proposals/96237/microbit?referrer=x6jjS7LwKdPSAtdzObISPw2 If you find such a site helpful, please commit and help establishing the site :) – Eirik M Aug 22 '16 at 10:22

4 Answers4

5

You won't be able to use Bluetooth for the reasons indicated in the documentation (not enough memory): http://microbit-micropython.readthedocs.io/en/latest/ble.html

However, there is an incoming implementation of the lighter radio module, which would allow you to send simple data: https://github.com/bbcmicrobit/micropython/pull/283

The proposed documentation can be found in: https://github.com/bbcmicrobit/micropython/pull/305

As you can see in GitHub, at the time of writing it has not yet been merged into micropython. So if you'd like to try it you would have to clone the repository, apply the patch and build it from source. Keep in mind there is risk for the API to change, as there are still discussions about it.

Alternatively, as Sean has mentioned, you can use the C++ DAL implementation of the radio module to get something running on the meantime. Or if you prefer, the blocks and touch develop languages also offer radio functionality.

carlosperate
  • 594
  • 4
  • 11
2

I don't think there is a way to do this in micropython (or at least simply), but the microbit runtime docs describe that, as well as supporting bluetooth, the 2.4 GHz radio:

However, it can also be placed into a much simpler mode of operation based that allows simple, direct micro:bit to micro:bit communication

In order to use this, you might need to write in c++ using the mbed environment (or offline) - but I hope this at least gives you a pointer to start from.

Sean Houlihane
  • 1,698
  • 16
  • 22
1

Here's a blog post describing how to do data logging using two microbits in exactly the configuration you describe.

http://www.suppertime.co.uk/blogmywiki/2016/06/microbit-logger

Stephen Simmons
  • 7,941
  • 2
  • 21
  • 13
1

How to get the two micro:bits to talk to each other

As of 2016, you can! First check micropython has the radio module

import radio

If you get the error "No module named 'radio'", use https://codewith.mu/

Then follow the radio tutorial https://microbit-micropython.readthedocs.io/en/latest/tutorials/radio.html

The API is

https://microbit-micropython.readthedocs.io/en/latest/radio.html

Colonel Panic
  • 132,665
  • 89
  • 401
  • 465