I thought long and hard about this, as a lot of effort went into making these building instructions, but I concluded that I feel better about sharing them with as many people as possible than sharing them with a handful and making a few bucks.
So I’m happy to announce that all the instructions I made so far will be available for free. Go check them out.
I haven’t been writing a whole lot in the past months, but I feel some things breeding and I’m also super excited about the new EV3 coming out this year.
I just got two Glidewheels from Mindsensors for testing. The Glidewheel allows you to integrate other motors into your NXT models, providing precise control over even the oldest 9V motors.
The Glidewheel is designed for Power Functions motors, but works just as well for my RCX motors.
The hard part of using them with RCX LEGO is that they don’t fit directly or close to the RCX motors. You’ll have to mount them elsewhere and stick an axle through them. This is further complicated by the stud-based RCX LEGO.
The first thing I made with them is this small car that uses a drive and steer motor. Even with the rotation sensor that you could buy for the RCX, it was incredibly hard to steer a robot like this.
With the Glidewheel it is incredibly easy. Well, almost. My first attempt looked much like my past attempts with the RCX.
The RCX motors are a lot faster than the NXT motors, so what happens is that the PID controller in the NXT starts overreacting.
To stop this, I used an algorithm called gradual descent(or twiddle, as prof Thrun calls it), which basically modifies P, I or D a little, and sees if it gets better or worse.
The only problem with Java is that it’s verbose. Compare a simple program that prints “Hello world!” written in Ruby, and in Java.
You might wonder why Ruby is suddenly involved. It’s because of Mirah, which is Ruby syntax for Java classes. You could thus run the linked Ruby code, but you are actually using java.lang.System.out.println.
This means that if you need to know how to write something, google for the Ruby solution. If you want to know which classes to use, look for the Java solution. (classes are like hierarchical collections of words, more on that later)
To make this all work with the NXT, you first need to instal Lejos.
To install Mirah, you also need to install jRuby, afterwards you can just run
jruby -S gem install mirah
Stay tuned for for some Mirah code for the NXT. I might also tell you more about classes.
So there you are. This is the result of a day or two of LEGO building, followed by weeks of thinking, sawing and soldering. Lucky for you, you don’t have to go through all that, and can just buy the needed parts.
This cute little bug can walk forwards, backwards and turn around, using 4 pumps on 3 switches. The outer 4 legs can move back and forth, with left and right having an individual pump. The middle legs are connected, and can move up and down.
By tilting the middle leg right, the outer right legs come of the ground, while the middle leg on the left is off the ground, then the outer legs can be repositioned for the next cycle.
There are touch sensors on the middle legs, to detect when they are of the ground.
This is another advanced home-made device, It took me weeks to do it. I was looking at the Mindsensors servo controller, when Matt Allen casually mentioned you could make them yourself. Once I set out to make one, I wanted it to do a little bit more.
I thought it would be nice if it could read input from an RC receiver as well. The final design has 2 readable inputs and 3 switchable ones, so you can directly control the servos.
Starting in the top-left corner, going clockwise, there is the PICAXE programmer header, 3 servo outputs, the servo battery connector, the NXT connector, 2 readable inputs and finally 3 switchable inputs. The PICAXE can directly control the outputs, or route them straight to the 3 non-readable inputs, for remote control.
If you know what you’re doing, this is the stripboard layout I designed. Use wisely, and at your own risk.
The code, more or less compatible with the Mindsensors quick mode.
table 0x00, ("V0.1")
table 0x08, ("pepijn")
table 0x10, ("servo")
for b20 = 0 to 0x17
readtable b20, @ptrinc
symbol servin1 = w0
symbol servin2 = w1
symbol servpos = b4
symbol servpin = b5
symbol incontrol = b6
hi2csetup i2cslave, 0x02
pulsin b.1, 1, servin1
pulsin b.0, 1, servin2
put 0x42, word servin1
put 0x44, word servin2
if servin1 < 1200 then
incontrol = 1
incontrol = 0
incontrol = 1
hi2cflag = 0
if incontrol = 1 then
get hi2clast, servpos
let b20 = hi2clast - 0x5A