Showing posts with label nonamebot. Show all posts
Showing posts with label nonamebot. Show all posts

10.09.2010

Day 10.5: Loose ends

or "someone just came in and said something about engineering?"
or "what is this- it is usually quiet and there is no one here and I can look for the perfect dumb video link oh man now there is someone else, and there are parents too?"

Hello fall break!
(PS where did everyone go?)
Wrapping things up with Challenge 6:

part one of which looks like this-
"1. ab-on-off: Motor a is on when switch 1 is pressed and is off otherwise; motor b is on when switch 2 is pressed and is off otherwise."
so off we go to code-
the file name is ABBA.png??
and that little stack checks constantly to see if you are pressing either switch-
if at that moment you are pressing that switch it turns the associated motor on,
and if you let go it shuts it off,
which is great, because you can drive it around and make it bump into stuff-


IT IS ACTUALLY PRETTY CUTE

and then part two which looks like-
"2. ab-reverse: Pressing switch 1 reverses motor a on and off and pressing switch 2 reverses motor b. "
which in practice ended up pretty similar-
click click click code code code
With the addition of an initial motorOn and some Waits to compensate for my sub-super-human button pressing abilities
and this is also great because you can make it spin around and run away from you-



IT IS ACTUALLY NOT REALLY AS CUTE?

9.24.2010

Day 6: I'M SORRY DAVE, I'M AFRAID I CAN'T DO THAT.

port swapped 
and suddenly every thing was peachy!
look how much nicer that is
IF either sensor is over the black, THEN the code corrects for this and navigates any turns.
ELSE the robot proceeds straight.
(swapping sensor and motors around leads to massive freakouts and general robotic sadness)

perfectly straight.
that little chunk with the R and L ensures that.
using the counters in either motor we can make sure that neither motor gets ahead on rotations, regardless of friction or anything at all really.
a really helpful feedback loop!


and so, at 80 percent power so it doesn't shoot right off the line-

(music is from Also sprach Zarathustra by Richard Strauss)
(ps, that's me!)

Day 6: TROUBLESHOOTING RULE #1: IS IT PLUGGED IN?

or "BLUH!!!"

SO. This is where we started today-
with that block of code from day 5 for line following with sobriety.
i am completely in love with nested if-then-else statements
but try as we might, we couldn't get it to work.
SO. several hours of confused coding and hair pulling later we have a workspace that looks something like this.
horrible.
that is not one or two but four different code for the same thing.
none of which work. 
at all.
(that is not all! there were several scrapped attempts from other angles! 
including several wait until's 
and parallel sensor-motor programs 
and attempts to recalibrate the sensor values
and 
etc 
etc 
etc)


but then. we addressed the obvious.

see.

The problem with working in code is that the world is not as nice as a simulation.
and sometimes. robots are not as nice as a simulation.


and sometimes-

sensors are plugged into slightly broken ports.

9.21.2010

Day 5: DOUBLE UPDATE, SO INTENSE!

or "yes, I did actually just say that"

we wrapped up the day by trying to address the issue of 'sobriety' in the black line challenge.
The old code-
man, THIS again.
lead to weaving and bobbing and general robotic drunkenness when implemented.

This new code is meant to address that.
They tried to make me go to rehab, I said no no no
Not that it actually works right now, but the general idea is to nest if-then-else statements to address straight lines (this whole two CS classes thing is starting to pay off a tiny bit!)
So when neither sensor is over the line it goes straight, and only turns when it has to to negotiate a turn or the fact that the motors don't go straight.
Hopefully!

Day 5: THE PURSUIT OF HAPPINESS

or "You cant always get what you want except for when you do"
     (or "They are watching Glee in here instead of listening to the Rolling Stones, I am so confused??")

Today, we worked on getting something that worked perfectly okay to work better.
by nixing some 'wait until's and increasing the resistance and fiddling and fiddling and fiddling we came up with a whole new code that works a whole lot better-
the filename is 'search and seizure'??
That whole monstrous if-then-else block pretty much means that-
If one sensor reads higher than the other, the robot turns in that direction!
Complete with search function where it turns in a circle to find the light before proceeding forward!!
Observe-

ROBOTS MAN, THEY CAN DO STUFF. CRAZY!
(ps. those are also my shoes)
(commentary by Kami)

Day 4: REDUCE REUSE RECYCLE

or "the three R's"
       (or "Man I love Jack Johnson but what is up with these guys?")

HEY GUYS CHECK THIS OUT
where have we seen this before?
with a little bit of old code
and with some totally huge new eyes
totally huge new eyes
dreams CAN come true-

(totally excellent music comes from the game World of Goo by 2dBoy)
(totally excellent shoes come from those are my shoes)

9.17.2010

Day:4 NICE WEATHER WE'RE HAVING, HUH?

or "HAVE YOU SEEN THIS? HAVE YOU?"

This update brought to you a few days late, because I came down with a case of NICE DAY SYNDROME.
THIS IS A SERIOUS BUSINESS CONDITION 
So, here we go!

Friday was a productive day!
Still working with the RDS crickets, but with a new partner
(Kami can be found at kamibots.blogspot.com ! check it out!)

The challenges continue with line following-
Follow the line little robot
This little stack of code makes the bot follow a line!  For real!
See, sensors 1 and 3 are reflectance sensors- they shoot out lights outside the visible spectrum and measure how much bounces back.  From these numbers we can tell what color is beneath each sensor.

There are two sensors, on either side of the bot.
And both trigger the 'wait until' to relinquish control to the next step in the code once the sensors read higher than 500 (which happens when over the black)
By associating the sensor with the motor on the opposite side the (currently nameless) robot turns on say... the right motor when the left is triggered.
The robot then goes to the left and moves the left motor off the line until the right sensor is triggered.
etc
etc
ad nauseum.
or "until you grab it and shut the robot off manualy'-eum.

LIKE THIS-
you can just watch it go around, and around and around.

Cool yeah?
Very cool.

With narration by partner Kami!
(you can check out her blog at http://kamibots.blogspot.com/)

PS SNEAK PEAK!!!???-