Use 2 accelerometers to control the rotation of one servomotor

Hello guys, i am having hard time in figuring out what arduino code would allow me to use 2 accelerometers to control the rotation of one servomotor.

The idea is to wear the 2 accelerometers on the feet, 1 accelerometer per foot and based on how fast or slow i step in place, the rotation of the servo motor changes and stays at 2 specific angles .

Let’s say 90 degree is the angle of the servo associated to no movement of the accelerometers.

110 degree is the angle of the servo associated to the stepping/walking in place at a costant low frequency of movement of the feet/accelerometers

130 degree is the angle of the servo associated to the stepping/walking in place at a costant higher frequency of movement of the feet/accelerometers

Any help please ?

Thanks

Hello @Marcob and welcome to the forum!

I think the following tutorials can help you out with your project:


You simply have to combine those examples and make the required changes to suit your requirements.

Let us know how it goes and if you need more assistance :grinning:

1 Like