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



18 comments:

Anonymous said...

viagra generic free viagra samples before buying viagra soft tabs viagra equivalent viagra from india canadian viagra viagra patent new viagra viagra rrp australia cost sublingual viagra sublingual viagra non prescription viagra viagra rrp australia cost free sample pack of viagra

Anonymous said...

[B]NZBsRus.com[/B]
Dismiss Slow Downloads With NZB Downloads You Can Swiftly Search High Quality Movies, Games, MP3s, Applications and Download Them at Fast Speeds

[URL=http://www.nzbsrus.com][B]NZB Search[/B][/URL]

Anonymous said...

Making money on the internet is easy in the hush-hush world of [URL=http://www.www.blackhatmoneymaker.com]blackhat affiliate[/URL], It's not a big surprise if you haven’t heard of it before. Blackhat marketing uses little-known or misunderstood avenues to generate an income online.

Anonymous said...

Nice blog! Is your theme custom made or did you download it from somewhere?
A design like yours with a few simple tweeks would really make
my blog shine. Please let me know where you got your design.

Bless you

Feel free to surf to my weblog: http://best-retweet.com

Anonymous said...

I seldom comment, but I looked at a few of the responses on "Bumpy".
I do have a few questions for you if you do not mind. Is it simply me or does it look like
a few of the comments come across like they are written by brain dead visitors?
:-P And, if you are writing at additional sites, I would like to follow you.
Could you post a list of every one of all your social pages like your twitter feed, Facebook page or linkedin profile?



Also visit my site - get followers

Anonymous said...

It's actually a great and useful piece of information. I'm glad that you just shared this useful info
with us. Please keep us up to date like this. Thanks for sharing.


My weblog: binary options trading platform

Anonymous said...

What's up, I wish for to subscribe for this website to take most up-to-date updates, therefore where can i do it please assist.

My page :: guide options binaires

Anonymous said...

Howdy! I know this is kinda off topic however , I'd figured I'd ask.
Would you be interested in trading links or maybe guest authoring a blog
post or vice-versa? My blog addresses a lot of the same topics as yours and
I feel we could greatly benefit from each other.

If you might be interested feel free to shoot me an email.
I look forward to hearing from you! Terrific blog by the way!


Take a look at my page http://followersempire.com/

Anonymous said...

Nice weblog right here! Also your website lots up very fast!
What host are you using? Can I get your affiliate hyperlink on your host?

I desire my website loaded up as quickly as yours lol

Look into my web-site: ava fx

Anonymous said...

This is the perfect website for anybody who wants to understand this topic.
You realize so much its almost tough to argue with you (not that
I really would want to…HaHa). You certainly put a fresh
spin on a topic that has been written about for a long time.
Wonderful stuff, just wonderful!

My web-site - www.funnyordie.com

Anonymous said...

This information is worth everyone's attention. Where can I find out more?

Also visit my page :: zulutrade

Anonymous said...

[url=http://www.casino-online.gd]casino[/url], also known as accepted casinos or Internet casinos, are online versions of forefather ("buddy and mortar") casinos. Online casinos franchise gamblers to filch up and wager on casino games from start to exhaust the Internet.
Online casinos superficially plonk down aside on the bazaar odds and payback percentages that are comparable to land-based casinos. Some online casinos behest on higher payback percentages looking destined for low function games, and some type apparent payout slice audits on their websites. Assuming that the online casino is using an correctly programmed unsystematic summarize a recap up generator, proffer games like blackjack clothed an established congress edge. The payout participation after these games are established in the future the rules of the game.
Uncounted online casinos sublease or discern their software from companies like Microgaming, Realtime Gaming, Playtech, Worldwide Artfulness Technology and CryptoLogic Inc.

Anonymous said...

For newest information you have to visit world wide web and on the web I found this web site as a finest web page for most up-to-date updates.



My site; private krankenversicherung gesetzliche

Anonymous said...

Hello there! I could have sworn I've been to this site before but after looking at a few of the articles I realized it's new to me.
Nonetheless, I'm certainly pleased I stumbled upon it and I'll be bookmarking it
and checking back often!

my web-site :: user:marcellag - Foradoeixo

Anonymous said...

Why people still make use of to read news papers when in this technological
world all is existing on net?

My page ... Recommended looking at

Anonymous said...

I don't even know how I ended up here, but I thought this post was great. I don't know who you are but definitely you're going to a famous blogger if you aren't already ;) Cheers!


Feel free to visit my homepage :: id 47483

Anonymous said...

Hmm is anyone else encountering problems with the
images on this blog loading? I'm trying to figure out if its a problem on my end or if it's the
blog. Any suggestions would be greatly appreciated.


Also visit my web page stay at home jobs Ontario

Anonymous said...

I'm not sure where you're getting your information, but great topic.
I needs to spend some time learning much more or understanding more.
Thanks for excellent info I was looking for this info for my mission.



My homepage: This Resource site