great work!...did you use the gyro/accelerometer setup to turn or just balance? im trying to set up a gyro/accelerometer combo to find degree orientation as I turn
@deadhaven I used it to balance. I have another version of the bot that uses the gyro for the rotation. I take readings at a fixed interval and sum them and then convert to degrees. Here is the puedo code:
gyro_sum = 0
for each time tick (10ms)
gyro = read_gyro - gyro_bias (bias is the value when not moving)
gyro_sum = gyro_sum + (gyro * 0.01)
angle = gyro+sum / 2.5 (gyro spec: 2.5mV @ 400 deg/sec or 10.0 mV @ 100 deg/sec, I used 2.5mV)
Thanks. Making it backup. The couple of things I have tried failed. Switching to reverse is to abrupt and causes it to oscillate. I'll eventually figure it out, that's the fun!
great work!...did you use the gyro/accelerometer setup to turn or just balance? im trying to set up a gyro/accelerometer combo to find degree orientation as I turn
deadhaven 3 months ago
@deadhaven I used it to balance. I have another version of the bot that uses the gyro for the rotation. I take readings at a fixed interval and sum them and then convert to degrees. Here is the puedo code:
gyro_sum = 0
for each time tick (10ms)
gyro = read_gyro - gyro_bias (bias is the value when not moving)
gyro_sum = gyro_sum + (gyro * 0.01)
angle = gyro+sum / 2.5 (gyro spec: 2.5mV @ 400 deg/sec or 10.0 mV @ 100 deg/sec, I used 2.5mV)
repeat while angle < desired angle
Hope this helps Mike
16mbuckley 3 months ago
very very nice!
AleJacko 1 year ago
Hey Mike, nice work!
What is the next step?
JeromeDemers 1 year ago
@JeromeDemers
Thanks. Making it backup. The couple of things I have tried failed. Switching to reverse is to abrupt and causes it to oscillate. I'll eventually figure it out, that's the fun!
16mbuckley 1 year ago