3 years, 1 month ago.

undefinde identifier

Dear forum users when I run the simpel display code ( to run the smily exampel) I get teh folowing error :

Error: Identifier "p13" is undefined in "microbit/microbit-dal/inc/drivers/MicroBitMatrixMaps.h", Line: 155, Col: 6 Error: Identifier "p4" is undefined in "microbit/microbit-dal/inc/drivers/MicroBitMatrixMaps.h", Line: 156, Col: 6

Doe's some one know where the problem lies?

With best regards Ben

Question relating to:

The BBC micro:bit is a pocket-sized, codable computer that allows anyone to get creative with technology. Made possible through a major partnership with 31 organisations, a micro:bit has been given …

Try P13 not p13

posted by Andy A 10 Jul 2017

1 Answer

3 years, 1 month ago.

Hi Ben,

If you are using the Online Compiler, please check to make sure you are compiling for the correct target board (the BBC micro:bit). You can change your target board by clicking on the board shown on the top right hand corner of the Online Compiler page.


When you click on the current Target Platform image a pop-up called "Select a Platform" should be displayed. Select the micro:bit image then click the green "Select Platform" checkmark.


If you don't have the micro:bit as a registered platform, you can add it to your online compiler by selecting the "Add Platform" button.

Please let me know if this solves your errors and if you need any further assistance!

- Jenny

Hi Jenny,

I also have a same problem in my mbed CLI environment.

The pins are defined with an upper-case letter in the mbed library PinNames.h of TARGET_NRF51_MICROBIT.

P13 = P0_23

But in the microbit library MicroBitMatrixMaps.h, the pin is called with a lower-case letter.

#define MICROBIT_DISPLAY_ROW1                   p13

So the error occurs when I include MicroBit.h.

#include "MicroBit.h"

Could you please tell me any ideas to solve if you have?

Best regards,

-Akanuma Hiroaki

posted by Hiroaki Akanuma 30 Oct 2017