Subject:
|
Drive a Legway with your remote
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Thu, 3 Feb 2005 06:16:09 GMT
|
Viewed:
|
1279 times
|
| |
| |
A while back I saw Steve Hassenplug's Legway and have always wanted to build
one for myself but just couldn't justify buying the custom sensors. More
recently, I found Philo's code for building a Legway with standard light
sensors so I quickly put one together, ran the code and awed and amazed my
friends with just how cool it is to have a Lego brick balance on two wheels.
But I wanted more...
While a Legway that can balance is cool, how much cooler would it be if I
could drive it around with my remote? I finally finished my robot for the
latest SMART meeting and after an "ah-ha" moment where I realized how simple
it should be I coded up the ability to use the remote to drive the Legway
around or to tell it to spin in place. The UI is pretty simple:
- Press and hold A-Up to move forward
- Press and hold A-Down to move backward
- Press and hold C-Up to turn left
- Press and hold C-Down to turn right
- Press B-Up and it will spin in place
- Press B-Down and it will cancel all movement and stand still
- Press Stop and the program will exit
I've found it works best on a smooth surface (ie not carpet) as it can't
lean enough to get moving on carpet. You can download the code at
http://home.comcast.net/~peartben/Lego/RemoteLegway.c.
Have fun,
Ben
|
|
1 Message in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in Robotics
|
|
|
|