You’ll never finish the task of tuning your RC car. After I did a couple of jump sessions by using a self made ramp I figured out that the oil shocks worked too softly. So I modified the rear shocks by exchanging the oil. I’m using viscosity 1200 and harder springs (reely) now.
At the front I just exchanged the springs by harder ones. The setup is much more robust now, though the setup is nearly too hard for flat terrains. Let’s see what the next part will be that need’s a replacement…
I enhanced the code a little bit that the cat can move without seriously hitting any objects. It is steered by the ultrasonic-, touch- and light sensor. I wrote a Java class to let the cat find a black spot by avoiding barriers. It’s kind of an ad hoc code, I’ll optimise it during the next days and will let it look a bit more organised.
After reorganising the code I think it’s a good basis to add more intelligence to it, maybe something for remembering the route and optimising the path.
But for now it does it’s job:
Java class:
package tospinout;
import lejos.nxt.*;
/** * 2008-12-27 author 2spinout */
public class Cat { static TouchSensor ts = new TouchSensor(SensorPort.S3); //initialize Touchsensor static UltrasonicSensor us = new UltrasonicSensor(SensorPort.S4); //initialize Touchsensor static LightSensor ls = new LightSensor(SensorPort.S2); //initialze Lightsensor
//drive train public static void main (String[] aArg) throws Exception { // PortA = Motor.A = ultrasonic movement motor // PortB = Motor.B = left driving motor // PortC = Motor.C = right driving motor // Port1 = SoundSensor // Port2 = LightSensor // Port3 = TouchSensor // Port4 = UltrasonicSensor
Due to the limited possibilities you have with the Lego Mindstorms software I just converted to the leJOS Java Virtual Machine and also flashed the NXT brick with the corresponding firmware. I think it will give me much more options in coding functionalities. In addition to that I’m using the Eclipse JDK. The firmware flashing and installation of the leJOS was very quick but I have to admit that the correct Eclipse setup took quite a while. It’s just because I never used it before. As this is all done now I’ll set up the first projects. Below you’ll find my first sample:
package tospinout;
import lejos.nxt.*;
/** * 2008-12-26 author 2spinout */
public class Cat {
public static void main (String[] aArg) throws Exception { // PortA = Motor.A = ultrasonic movement motor // PortB = Motor.B = left driving motor // PortC = Motor.C = right driving motor // Port1 = SoundSensor // Port2 = LightSensor // Port3 = TouchSensor // Port4 = UltrasonicSensor
I’ll try a project with Lego Mindstorms during the next weekends. I ordered a book that should teach me how to code the NXT model with Java. I’m looking forward to the results. As motivation I already played a little bit:
That’s exactly why I decided to get a mountain bike a few years ago. Because it’s not only preparing you for several territories, it as well allows one to extend the riding season. It was cold today, a couple of degrees Celsius below zero, but the sun came out, and this together with the will to test my new OREGON SCIENTIFIC ACTION CAM ATC5000 made me actually get out. So I rode my GHOST AMR 9000 trough the winter and loved it. I missed it.
The new action cam is actually very nice. It comes along with a small display and a much better CCD chip which improves the quality significantly.