I was wondering if anyone would be able to help me out with a design project I'm working on.
I'm trying to figure out how to wire up a circuit with a 2-axis accelerometer and a dimmer for a light. I want the light itself to swing, and as it does, the voltage to increase and decrease corresponding to the microGs recorded by the accelerometer.
/ 2010 mlab.taik.fi/paja
// Pendulum using MEMSIC2125 Accelerometer
//pin to read x axis value
int memsicXPin = 8;
//pin to read y axis value
int memsicYPin = 9;
//pin to + pin of Analog In pins in the DC controlled dimmer.
//- pin goes to GND.
int pinLamp = 11;