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() 
{  
    Wire.begin(); 
}

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

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.

BoardFirmware
Spike IR BoardVersion 0.9