In order to use the Neopixels with Arduino IDE we must utilise the Adafruit Neopixel library. This library only works with the the Microbit pins that are labelled “Analogue In”. When Bitbot was designed the designers decided to use pin 13 for the Neopixels (this works fine with PXT and MicroPython). This pin is not compatible with the Adafruit Neopixel library. In order to get the neopixels to work a slight modification is needed.
Pin 3 is compatible with the Neopixel library and its not used for Bitbot functionality; we will use that pin to control the Neopixels. To do this we need to solder pin 3 to pin 13, This will allow us to use the NeoPixel library as it was designed to be used. I tried to modify the library with little success. I then wrote my own library and created a low level timing library using the nRF5 SDK from Nordic however this would not work with pin 13 for some reason so I decided to use the Adafruit library and modify Bitbot. This modification shouldn’t affect the function of Bitbot however if you try to use the LED matrix on the Microbit you might get some unexpected behaviour. The below picture and video shows the modification.
Instructions on how to install the Adafruit Neopixel library can be found at; https://learn.adafruit.com/adafruit-neopixel-uberguide/arduino-library-installation
Any example from the examples included with the library will work. Just change the pin to 3. All of my Arduino example will use the Neopixel library so if your unsure about how to use it look at one of the Arduino IDE examples. If you don’t modify you Bitbot the examples will still work but the Neopixels will not. If anyone has another workaround let me know at email@example.com. I used the strandTest example for the below video that Adafruit includes in the Neopixel library.