Submitted by mlsmith on Fri, 03/11/2016 - 16:51
Can LED's be controlled via the ultra board?
I've been looking for an i2c board that can control one or Ultrasound distance modules and three or four LED's.
Also, can we get the boards without the pin headers to lower the price?
Thanks!
Mike
piborg
Mon, 03/14/2016 - 11:40
Permalink
Controlling LEDs using UltraBorg
It is possible to control LEDs using the servo outputs.
What you will need to do is connect the LED and an appropriate resistor for 5V operation between the
+
andS
pins on the servo connection.In order to control the LED properly you will need to use the
CalibrateServoPositionX
calls to override the normal behaviour.BE VERY CAREFUL DOING THIS, using these calls with a servo attached may cause permanent damage to the servo itself.
When using the
CalibrateServoPositionX
functions a value of0
will be full brightness, a value of0xFFFF
will be fully off.We can make a function to simplify things like this:
The same can be done for outputs 2 to 4.
The functions can be used like this:
Unfortunately all of the UltraBorgs we have in stock are fully assembled so we cannot sell them without the headers fitted.