Twinkle brighter little star #7733
Replies: 2 comments
-
I'm not sure about magnetometers. But wouldn't the magnitude of acceleration in the normal (as opposed to tangent) direction increase with higher RPM? So in that case you could align e.g. the x-axis of the accelerometer with the tangent line and the y-axis with the normal line of a point on the spinning wheel. Then you map the magnitude of the reading on the y-axis to the wattage given to the LED. Does that sound right? I think you will get som oscillating effects from the graviational acceleration overlapping with the x-y-plane you do reading in. But that may not matter. |
Beta Was this translation helpful? Give feedback.
-
Using the angular acceleration sounds like a great idea! I could be wrong here, but I think the value from the gyro will give you angular acceleration (but what you actually want is angular velocity) so it might not be that useful (while you can integrate it to get velocity, it would drift off over time). Just to add another option here - you've got a spinning wheel, but the LEDs that are changing brightness aren't spinning? So if you could have the sensor not spinning as well you could have just one microcontroller that read the signal and then controlled the LEDs? So on a bicycle you often have a magnet on the wheel which spins, and then you detect the magnet moving past with a hall effect sensor/reed switch - the number of times it passes in a minute = the RPM. I think there are a few options:
I'm very happy to help out with code. You could use an Arduino or something, but maybe something like Jolt.js would work well as it could control the lights directly and read whatever sensor you wanted to use. |
Beta Was this translation helpful? Give feedback.
-
looking for a really clever person!
Is there a way to use the magnetometer or accelerometer data from a puck.js or other device
To translate data from a spinning wheel into changing brightness of LEDs controlled by an arduino?
I can imagine the physical setup but I am not sure about the program
Can anyone point me to a project where changing magnetometer or accelerator data has been translated into changing LED brightness ?
Beta Was this translation helpful? Give feedback.
All reactions