LEGO Spike Prime – IR Ball Sensor

Our Spike Prime IR Ball Sensor offers a 360 degree view of the standard RoboCup Jnr Ball.

Getting Started

Python Example Project

Blocks Example Project

Arduino / Microcontroller Integration

Our board can be used from Arduino or other Microcontroller platforms.

Sample code for this is:

#include <Arduino.h>
#include <Wire.h>

void setup() 

void loop() 
    Wire.requestFrom(0x10 / 2, 2);
   while (Wire.available())    
     int c =; // direction is the first byte    
     Serial.print("Best Sensor is: ");    
     //smaller number the closer the ball
     int strength =; 
     Serial.print("Strength is: ");    

Updating Your Board

The IR board can be easily updated. To update your board to the latest software:

  1. Plug the IR board into your computer
  2. Find the reset button on the board

3. Double press the reset button.

To know if you have pressed the button correctly, you will see a new USB drive appear on your computer. This drive will be called LIGHTBOOT.

4. Copy the firmware update to this drive. The latest version can be downloaded in the table below.

5. The IR board will restart and the USB drive will disappear. It’s now ready to be used on your robot again.

Spike IR BoardVersion 0.9