My Cart:

0 item(s) - £0.00
You have no items in your shopping cart.

0

Adding Bluetooth Remote Control To :MOVE mini

Our :MOVE mini kit offers a great introduction to robotics. It can be used in a number of different ways. Most are mainly facilitated by the code that you place onto the microbit. In this resource, we’d like to show you how to add Bluetooth remote control to :MOVE mini.

intro pic

Adding Bluetooth functionality to :MOVE mini is as easy as putting some code onto the microbit. Then downloading the Kitronik :MOVE App for Android.  You will find the download and links at the foot of this resource.

 

Kitronik Custom Blocks For The Microbit Javascript Block Editor:

To add our custom blocks to the editor. Click on the cog in the top right of the editor and select 'Extensions' from the menu. This will open a dialogue window with a search box. Type Kitronik into the search box and all of our custom blocks will appear as tiles. Select the tile titled 'servo-lite' and it will be added to the blocks menu.

Bluetooth Remote Control servo lite

To add Bluetooth functionality to the menu, we have to first add the Bluetooth package. Select Extensions from the menu and then select Bluetooth.

We are now ready to write some code.

 

Writing The Bluetooth Remote Control Code:

As we are going to control :MOVE mini over Bluetooth we need to code the microbit so that it responds in the right way when it receives Bluetooth commands.

Bluetooth Remote Control on event code

All of our remote control code is going to be placed within an ‘on event’ loop. As shown above. You can find the 'on event' loop by expanding the Advanced menu option, You can then find the loop in the Control menu.

This will ensure that the microbit knows to expect commands from the DPad controller and what to once it receives them. We are going to use the A, B, C & D buttons in the App for driving, you can see how they are orientated on the App pads in the image below.

Bluetooth Remote Control dpad

Our controls will be:

  • A – Forwards.
  • B – Backwards.
  • C – Left.
  • D – Right.

As well as writing our code to respond to a button press, we also need to write code for what to do when the button is released. For our code, button release will always equal stop.

Bluetooth Remote Control if code

In the code above you can see how the code for the A button press works. When the A button is pressed, the buggy will drive forwards. When the A button is released, the buggy will stop.

We follow the same procedure for the other three button presses, just altering the drive command type for each.

We also want to write code to give some visual feedback via the microbits LEDs as to whether Bluetooth is connected or not. If the Bluetooth connection is dropped, ideally, we would want the buggy to stop regardless of the last command. The stop command acts as a failsafe to protect the system if control fails.

Bluetooth Remote Control smileys

The code above will display a smiley face on the microbit when Bluetooth is connected. If for any reason the connection is lost then a sad face will display and the servos will stop turning.

In the embedded editor below you can see the whole program. Once you grasp how the on event block works and how to define an on event value the code is uncomplicated to produce.

 

Downloads & Information:

You can download our code here.

Note: Unzip the Bluetooth Remote Control file and either drag the HEX file into the MakeCode editor for editing or connect your microbit to your computer and drop the file directly onto your microbit via your file explorer. The microbit should show up as a removable drive.

E-Textiles
← Previous Post Next Post →

16 thoughts on “Adding Bluetooth Remote Control To :MOVE mini”

  • Rob September 23, 2018 at 11:49 pm

    I have just assembled a move mini and watched the video on how to pair with Bluetooth. However, once assembled it is not possible to access the reset button on the microbit to set it into pairing mode!

    Please advise..

    Reply
    • Mark Donnison October 1, 2018 at 5:00 pm

      Hi Rob, we have a guide that explains the process: Copy and paste this into a browser: https://www.kitronik.co.uk/blog/pairing-a-microbit-move-mini/

      Reply
  • mark October 1, 2018 at 3:18 pm

    can i get the download for this pls i cant figure out how to make the thing

    Reply
    • Mark Donnison October 1, 2018 at 4:55 pm

      Hi Mark, If you mean the custom blocks, they are now added to the MakeCode editor;

      To add our custom blocks to the editor; Click on the cog in the top right of the editor and select 'Add Package' from the menu. This will open a dialog window with a search box. Type Kitronik into the search box and all of our custom blocks will appear as tiles. Scroll down and select the tile titled 'servo-lite' and it will be added to the blocks menu.

      Reply
  • Vince October 29, 2018 at 4:27 pm

    Hello,
    I'm looking for documentation about Control Menu for all the instructions. And also, what are the buttons possibilities. Sorry for my English.

    Reply
    • Mark Donnison November 13, 2018 at 3:47 pm

      Hi Vince, if you mean what the DPad buttons are named, you may find what you need here: https://www.kitronik.co.uk/blog/kitronik-move-app If this isn't what you were asking let me know and I will see if I can help.

      Reply
  • Rachel Watson November 1, 2018 at 8:38 am

    Is it possible to use the Neopixels at the same time as the Bluetooth?

    Reply
    • Mark Donnison November 9, 2018 at 9:20 am

      Hi Rachel, at the time of writing it isn't possible to have both the Bluetooth and NeoPixel Extensions (Packages) in the MakeCode editor at the same time.

      Reply
  • TC November 20, 2018 at 3:26 pm

    I downloaded your code, ensured I was not previously paired to my Android phone.
    I proceeded to pair (successfully) bit the Kitronik move app is not seeing the paired device.

    Reply
    • Mark Donnison November 22, 2018 at 3:30 pm

      Hi Tony, we don't have any issues pairing as you've described. Are you running the latest version of the App? https://play.google.com/store/apps/details?id=com.kitronik.blemove&hl=en

      Reply
  • Clark Jones November 26, 2018 at 12:34 am

    Glad I checked this *before* ordering. The lack of an iOS (Apple iPhone) app is a "deal killer" for me.

    Reply
    • Mark Donnison November 29, 2018 at 2:47 pm

      Ho Clark, thanks for getting in touch. There are other third party apps out there that work with iOS, Bitty Software for example, or there is control over radio with a second micro:bit. Plus there are plenty of coding options that require no remote control.

      Reply
  • Sean November 29, 2018 at 8:22 pm

    I had it working fine on blue tooth, with the game pad. I turned it off to download a new program via the cable and now my kitronik move app wont connect to the bonded microbit.

    Any thoughts?

    Reply
    • Mark Donnison December 4, 2018 at 9:40 am

      I would try to re-pair as high lighted here: https://www.kitronik.co.uk/blog/pairing-a-microbit-move-mini

      You may need to go into your phones bluetooth settings and get your phone to forget the microbit and then pair from scratch.

      Reply
  • James December 7, 2018 at 4:09 am

    Hi,

    I’ve installed bitty app on my iOS phone and paired the micro bit move to my device but it doesn’t move.

    Where can I download the code so that the control will control the micro bit :move

    Thanks,
    James

    Reply
    • Mark Donnison December 7, 2018 at 9:30 am

      Hi James, there is an embedded editor just above the downloads section at the bottom of the page. You can download our code from the embedded editor via the link at the bottom of the editor. You can also click on Edit to open the code in the online MakeCode editor and download it from there. I hope this helps.

      Reply
Leave a Reply