BBC Micro:bit coding from Arduino IDE Cheat Sheet

A Education › Engineering cheat sheet in English by Plugga

Tutorial how to set up Arduino IDE to code Micro:bit

4,004 views 1,726 downloads 2 Dec 2020 History

Plugga Studios Tutorial

Plugga Studios Tutorial

Additional Board Manager URL

Additional Board Manager URL

Open Tools

Open Tools>­Boa­rd>­Boards Manager from the menu bar, search for nRF5 and install “Nordic Semico­nductor nRF5 Boards” by Sandeep Mistry

Wait.

Wait for the instal­lation. It will take a while.

Select Micro:bit

Select BBC micro:bit from the Boards menu.
Set SoftDevice to S110.
And set the Port to the Micro:bit COM port.

Start Arduino IDE

Start your Arduino IDE, then click on Prefer­ences.
Add the URL into the Additional Board Manager URL text box

Arduino File

Arduino File

Boards Manager

Boards Manager

Test code

const int buttonA = 5; 
const int buttonB = 11;
 
void setup() 
{  
  Serial.begin(9600);
  pinMode(buttonA, INPUT);  
  pinMode(buttonB, INPUT);   
}
 
void loop()
{
  if (! digitalRead(buttonA)) 
  {
    Serial.println("Button A pressed");
  }
  if (! digitalRead(buttonB)) 
  {
    Serial.println("Button B pressed");
  }
  delay(150);
}

Comments

No comments yet.

Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.