Install board and blink!

Install Windows 7 Driver

If you are running Windows 7 you need to install this driver.

If you are on Mac, Win 10+ or Linux it is not require! Skip this step

Download Arduino IDE

You will need to use the Desktop IDE. Make sure you are running the latest version.

Install SoftDevice onto MicroBit

Arduino assumes there's a 'softdevice' radio already installed. If you used MicroPython with your microbit, that softdevice was erased.

Reinstalling it is easy, download this hex and 'drag' it to your MICROBIT drive to install a MakeCode bluetooth advertising example. That, for sure, will force you to have a softdevice on :)

Add NRF5x Board Support

The microbit uses the nRF51 which is not 'natively' supported. But its easy to add support!

In Arduino, go to Preferences and add https://sandeepmistry.github.io/arduino-nRF5/package_nRF5_boards_index.json into the Additional Board Manager URL text box.

 

If this is not your first, make sure to separate URLs with a comma.

Open Tools>Board>Boards Manager from the menu bar, search for nRF5 and install "Nordic Semiconductor nRF5 Boards" by Sandeep Mistry

Select Board and Upload

Select BBC micro:bit from the Boards menu

Set SoftDevice to S110

And set the Port to the microbit

And create a new sketch with this blink demo

const int COL1 = 3;     // Column #1 control
const int LED = 26;     // 'row 1' led

void setup() {  
  Serial.begin(9600);
  
  Serial.println("microbit is ready!");

  // because the LEDs are multiplexed, we must ground the opposite side of the LED
  pinMode(COL1, OUTPUT);
  digitalWrite(COL1, LOW); 
   
  pinMode(LED, OUTPUT);   
}

void loop(){
  Serial.println("blink!");
  
  digitalWrite(LED, HIGH);
  delay(500);
  digitalWrite(LED, LOW);
  delay(500);
}

Click Upload!

If you get a warning about openocd - approve access so it can upload the code

You should see the top left LED blinking!

Last updated on 2017-10-12 at 08.07.26 PM Published on 2017-09-27 at 01.15.13 PM