7/31/2018
Lumen Light R2
http://docs.bluerobotics.com/lumen-r2/
5/6
Example Code
Arduino
This example uses the Arduino Servo library to control the light brightness. This provides an update rate of 50 Hz and can use
any pin on the Arduino board as the “servoPin”.
If you’ve never used Arduino before, we suggest checking out some tutorials! (https://www.arduino.cc/en/Tutorial/HomePage)
#include <Servo.h>
byte servoPin = 9;
Servo servo;
void setup() {
servo.attach(servoPin);
servo.writeMicroseconds(1100); // send "off" signal to Lumen light
}
void loop() {
int signal = 1700; // Set signal value, which should be between 1100 and 1900
servo.writeMicroseconds(signal); // Send signal to Lumen light
}