3 wheel Lego car
I started this project in the summer of 2011. The main idea is to create a robot from the Lego Mindstorms NXT2.0 kit and to program in ADA/Ravenscar profile, GNAT GPS nxt-mindstorms-windows version 2011 . First of all, I built a simple car and control system. Next, I built an inverted pendulum. The first challenge was to figure out, how to generate the binary file and upload it to the brick. You could find hardly any documentation or tutorials and the RreadMe file wasn't enough. In the uploaded file I wort a step by step instruction for that purpose.
My simple car had 3 wheels from which two were actuated and controlled with a "Lego joystick" made of a touch sensor and a motor. The robot moves only when the touch sensor is pressed and the direction of the motion is based on the stick position: forward, backward, turn left, and right as shown in the video.
Finally I built an inverted pendulum and tired to control with two different methods, Pole Placement and PID. Pole Placement requires a mathematical model which is based on the physical characteristics of the system. I planned to use the HiTechinc Gyro sensor to measure the pitch angle of the segway but it sensor is not in the Lego Mindstorms base kit. So used a light sensor instead. I didn't finish the project due to a motor driver bug (only one motore command could be sent at time) and I run out of time .