Disable an individual servo!

2 replies [Last post]
Title: YAC
Joined: 04/12/2009
BotPoints: 94
User offline. Last seen 12 years 46 weeks ago.

Hey guys, just wanted to release another useful snippet to come from the Botball chat. After noticing that the servo screen on the CBCv2 enables servos individually, we used the source to figure out just how to do it.

In the new CBC, enable_servos() and disable_servos() are now simply shortcuts. To enable an individual servo, just set its position, without calling enable_servos(). And to disable a servo, set its position to '-1'. If you look at the source code above, you'll see that this is exactly what enable_servos() and disable_servos() do internally.

Hope this helps someone!

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction.

Albert Einstein

Project Quadcopter: http://quadcopter.wordpress.com/

mcsoccer11's picture
Title: Botball Youth Advisory Council
Joined: 04/02/2009
BotPoints: 52
User offline. Last seen 11 years 23 weeks ago.

We actually noticed that initially, I totally forgot to mention that to anyone

Title: NooBot
Joined: 02/26/2022
BotPoints: 22
User offline. Last seen 43 weeks 10 hours ago.

Før du bestiller en tid til hypnose behandling, så vær sikker på at det er dit eget ønske at blive hypnotiseret. Hvis det ikke er muligt at finde en tid, kan du sætte din email ind på min elektroniske venteliste. Så kontakter jeg dig, når der er ledige tider til hypnose behandling. Hvis du vil rette din tid eller afbestille, så kig i den mail du fik da du bookede tiden.