Using Teensy Prop Shield to adjust LED brightness

Status
Not open for further replies.

tripflex

Member
Hey guys, i've got a Teensy 3.2 hooked up to the Teensy Prop shield, and I was hoping someone could point me in the right direction on what I may need to research on, or where I could look for more documentation on the NXP Motion Sensors.

My intention is to use the motion sensors to adjust the brightness of the LEDs based on how fast it's moving. Haven't done anything with accelerometers before, but I do understand the theory behind them, just need to come up with some type of way to use that data to then adjust the brightness.

Does anybody have any suggestions, tutorials, more documentation, or could maybe help out to try and figure something like this out?

My first thought is to maybe store the value of the Yaw in a variable during the loop, and then check the difference between the stored value and current value, but i'm hoping someone can at least point me in the right direction so I can start off on the right foot :)

Thanks!
 
If you have the NXP library, see the examples for the two IMU. The produce cyclic values for the various values that you can then feed to LEDs. One option is to keep an array of LEDs, and shuffle them down the strip with the first one having brightness based on speed, angle or acceleration. Have a look at the serial output provided by the examples to get an idea of the range of results so you can scale to the LED values (normally 0-256).
 
Status
Not open for further replies.
Back
Top