Installation manual and usage instructions
Step 1 – connecting the LED to the hub
1a – Use a Torx T6 screwdriver to remove the two screws on the back of the LEGO® SPIKE™ Prime ultrasonic sensor. Then remove the white part.
1b – Insert the brickobotik shield and screw the Torx T6 screws back in.
Step 2 – getting the brickobotik library
2a – Open Google Chrome Browser on your PC or Laptop.
2b – Connect the LEGO® SPIKE™ Prime to the USB port of your device.
2c – If the LEGO® Education SPIKE™ application is running on your device, please close it.
2d – Use the brickobotik library tool to download our library onto your hub.
3a – In the LEGO® Education SPIKE™ App use python for writing your program. You can now use all of the LED’s features as documented in the API below.
This shield’s source API
brickobotik shield: LED x2 actuator
In order to use the LED you have to initialize it first.
Example:
from brickobotik import LED
# initializing the LED at port A
my_led = LED(‚A‘)
on(brightness = 100, duration = 0.0)
Turns on the LED with a specified brightness for a specified
duration. If the duration is 0.0 or not specified, the LED
will stay activated until it receives another command or the
program ends.
Example:
# turn on the LED with the default brightness 100
my_led.on()
blink(brightness = 100, interval = 1.0, repetitions = 1)
Turns the LED on and off repeatedly.
Example:
# blink three times for two seconds with brightness 50%
my_led.blink(50, 2.0, 3)
fade(from_brightness = 100, to_brightness = 0, duration = 1.0)
Smoothly transitions the brightness of the LED from one level
to another.
Example:
# dim the light from 100% brightness to 50% within one
# second
my_led.fade(100, 50, 1.0)
off()
Turns off the LED.
Example:
my_led.on()
# do something
my_led.off()