The competition has set the bar pretty high - Curl, HUL 10 Version 2, Crepton, and Mult-CD all look pretty sweet. So I may need to up my game a bit by adding motor encoders. Fortunately, the Arduino community comes to the rescue again with a nice write up of interfacing to a PS2 mouse. Using this code I was able to get rotation and switch info back from the mouse this morning. Off loading the quadrature encoding to the mouse chip is a good idea - lightens the load on the motor control Arduino considerably. And I get 3 free switches. All for the cost of 2 digital pins on the Arduino.
a good use for a dead mouse
I don't think the mouse will fit in the Coasterbot as is LOL (and the encoders aren't oriented the way I need them anyway), so I'm going to have to do some cutting to make it fit.
cut on the black lines...
a little hot glue and I'll have a Lego compatible encoder wheel
The hardware won't be too bad, but there's a lot of code to change in the motor controller to make use of the encoder info. We'll see if I have time this weekend - Ironman 2 came out yesterday, I'm judging all day Saturday at Robofest, Sunday is Mother's Day. So I might not get it done this weekend, but I'll give it a try.
Brian
The Black Dog
No comments:
Post a Comment