Monday, May 7, 2007

Bumpy


ENTRY 2

Introducing, ....

Bumpy!

After realizing that it might be a good idea to go through the tutorial projects, to improve my understanding of Technic construction methods. I decided that, since I was most interested in beginning to understand the programming aspect of robotics, I would just make my own little modifications to the starter robots(to still somewhat satisfy my constructively creative needs), and use them to take the NXC tutorial at the same time.

NXC is a text based programming language for Lego Mindstorms. You can find the tutorial here. Also be sure to visit the BricxCC link by clicking on its link over in the links section. BricxCC is an IDE for NXC, and has many useful features like syntax, debugging, and more.

Anyway..., back to Bumpy.

Bumpy, is the "TriBot" that's the first robot your instructed how to build, with a few extras. With help from the NXT Educational Resource Set I used a larger wheel size, and new caster wheel assembly. I also made a poorly constructed "bumper" mechanism for the touch sensor, and extended the "neck" for the US sensor.

I wrote a simple program in NXC that told Bumpy to move forward indefinitely until the receives input from the touch sensor. At which point he backs up, says "woops!", and then turns around and drives in a different direction.

Soon I hope to post links to the code for my projects. Until then, I will include it in my posts, along with line by line explanations.

--bumpy.nxc--

CODE / Description

#include "NXCDefs.h" /load NXC Definitions into memory.

#define MAXVOL 7 /define the term MAXVOL for use. Assign it a value of 7.
#define MINVOL 1 /define the term MINVOL for use. Assign it a value of 1.
#define MIDVOL 3 /define the term MIDVOL for use. Assign it a value of 3.

task main() /Create task.
{ /Start "main" task.
SetSensor (IN_1,SENSOR_TOUCH); /Acknowledge a Sensor(Port: 1, Type: Touch)
PlayFileEx("! Startup.rso", MAXVOL, FALSE); /Play a File(Filename, Volume, Loop?)
Wait(1500); /Wait for program to carry out previously stated function(s)
PlayFileEx("! Attention.rso", MAXVOL, FALSE);
/Play a File(Filename, Volume, Loop?)
Wait(1000); /Wait for program to carry out previously stated function(s)
repeat (12) /Repeat commands listed below. (how many times?)
{ /Start "repeat" command list.
OnFwdReg(OUT_BC, 50, OUT_REGMODE_SYNC); /Move forward.(ports, power, sync motors)
until(SENSOR_1 == 1); /Interrupt previous command(s)if(touch sensor activated)
OnRevReg(OUT_BC, 40, OUT_REGMODE_SYNC); /if "until" happens - Move Backwards.
Wait(800);
/Wait for program to carry out previously stated function(s)
PlayFileEx("Woops.rso", MAXVOL, FALSE); /Play a File(Filename, Volume, Loop?)
Wait(800); /Wait for program to carry out previously stated function(s)
OnRev(OUT_B, 40); /Spin Motor Backwards(port?, speed?)
OnFwd(OUT_C, 40); /Spin Motor Forwards(port?, speed?)
Wait(1000);
/Wait for program to carry out previously stated function(s)
} /end "repeat" command
Off(OUT_BC); /Turn off(port?)
} /end "main" task




-Quote of the Post-

In this life, judge no one,..
but watch out for @$$holes.
- Anonymous



ENTRY 1

Instructions, pffft. "Start Here", the box says, pffft. I had Legos when I was a kid. "This is gonna be a breeze", I say. "Who needs a tutorial?", I ask myself.

Pffffft.....

Well apparently I do.

True, I'd had almost no experience with Technic construction methods(I had a couple of bionicles), I thought it would be easy enough to basically, just fall into. Well, now I can tell that it's going to take some "getting-used-to". Learning the sizes and dimensions of all the different pieces, well enough to be to efficiently build something without tons of trial and error.

As I learned on my first day, you can't just start throwing pieces together and hope for the best. You need at least a "rough-draft" in your mind, on paper, or some other medium, of what you're trying to accomplish before you start. I learned this after my first original building attempt, which I just ended up scrapping less than 1/2 way through construction.

Still trying to create something original, without any preconceived notion of what I was doing, my second attempt wasn't much better.

Enter, CrapBot...

CrapBot was a horror of engineering. Initial design was "amended" as construction continued. By the time all was said and done, the support structure was a "give-and-take" between stability, and the retention of its ability to clear the ground. Pieces were layered in arbitrary places, sometimes providing almost no added support.

I need more experience understanding gear ratios, and proper placement. I've decided to go back and start from the beginning.


-Quote of the Post-
What we do for ourselves, dies with us.
What we do for others, and the world, remains eternal...
- Albert Pike



Sunday, May 6, 2007

Welcome
to
NXT-GEN Robotics

This web log(or "Blog")will be an online journal of sorts, for myself to keep track of past creations, and experiments so that I can create an efficient learning process.

Also,

This will be a general hub of Mindstorms NXT Robotica. Links to other useful blogs, forums, and websites. As well as links to informative papers, books, etc.

Quote of the post:

Resolve is never stronger
than the morning after the night it was never weaker.
- Unknown