A lego robot me and my friend Mitchell built to type on a keyboard. Lego sensors are not the most accurate, so still misses a key every now and then.
The construction of the bot is pretty sturdy though. It went through several generations of Mitchell and I fighting over better solutions. Eventually we came to an agreement and built this design. I think with a little bit better programming it could be more accurate. It is written in java using the leJOS firmware for the RCX 2.0.
The tape on the keys helps the light sensor get a good reading when it is on a key. That probably wasn't totally necessary but it did differentiate the two states for the light sensor quite a bit.
The construction is a length of some washboard type piece which the gears can travel over, all connected to a long flat "rod" that runs through the tank tread. One motor controls the tread (Y) and one the washboard gear (X). The programming is a mess of if statements and while loops. Keyboards are not very regular. The keys are not even vertically staggered (at least on this board). So the if statements would help figure out what kind of movement. While loops worked to get motors going until the light was bright enough. I tried to avoid hardcoding distances in (except with rotation sensors) so that it could be a little flexible. That is necesarry because the batteries die quickly and the motors speed is not always constant (hits rough spot, gets little bit stuck on a wire, etc.)
nice
TheLegoLG 7 months ago
lol
Sc0ttPrian 11 months ago
One day there will be a competition for the most complex way to type "hello world" on the screen.
Rpahut1 1 year ago