Monday, February 13, 2012

"Get with the Program": A PORPOISE Robotics Rap...

Can we work together to create "Wiki Raps" that can help students (and not-so-students, like parents and teachers) learn the basic concepts behind the kind of computer and micro-controller programming that we all have to learn to do robotics? Could we co-create raps that, through the writing and recording process and through the repetition necessary for performance and joyful listening, subliminally embed information that can help non-coders and non mechatronix builders develop facility with the vocabulary and concepts in our field?

Writing and recording and performing such "functional pieces of 'rhythm and poetry' (i.e. R.A.P) is something that Kelly Cooper of the Office of Naval Research tasked PORPOISE members to do after listening to our rock-a-billy Arduino song, and with our history of "melodic-mnemonics" (a program we developed at D.E.M.M.O. Productions in South L.A. in the 90's wherein melody acts as a carrier wave for relevant scholarly information) we decided to jump in to the deep end of the pool and take on the challenge.

Below is our first stab at creating a rap called, "Get with the Program". Dewayne Williams, a student at WMST in DC performed it for Kelly on Friday February 10th and now we are opening it up to improvements and refinements by the PORPOISE learning community.

Let's see where we can take this as a collective effort, and also see what more we can come up with to allow the marvelous medium of RAP assist in bringing robotics of the people by the people for the people to the people. Word!

(performed by two students, A and B)

A: Get with the program
Go with the flow
Put in your flowchart
What your robot's gotta know

B: A routine, a sub, method, function or class
That's how we get our bot to do what we ask

A: A variable...
B: What's that?
A: It's a shoebox for data
You can make up its name as you go

B: So now tell me what's a conditional statement?
A: Just think of it as a fork in the road...
If this, then that, if not? Well, that's that!
And the else command says where to go!

B: A sensor gives input to check where we're at
Using branching conditions contained in the code
In a loop that repeats and repeats and repeats and repeats and repeats 'til you're old!

A: So get with the program, yeah
Go with the flow! (B: That's wild!)
For the program to run though, it must be compiled,
'cause no robot reads English, our words they don't know

B: We gotta teach them -- the robot's a child!

A: The way the commands are assembled is syntax
But it varies for Arduino, Basic Stamp or for PICAXE..

B: And all gets compiled to machine code... so....

A: Get with the program
B: Let's learn to translate
A: Start talking to robots that WE THE PEOPLE create!

Each microcontroller has its "secret code"
with subtle differences that you'll come to know
Some are based on Basic, some are based on C
interpreted to the machine through the assembler code

Arduino's program structure is a type of C code
But its easy to learn once you go with the flow
Cut and paste other's code, like monkey C monkey do, y'all
Hacking the old to come up with some new gold

The program structure has only three attributes
A simple dec-laration, void setup, void loop
That's it, a dec-laration, void setup, void loop
The code is organized into these three basic groups

And you can call in powerful libraries,
that others have written -- it's like "call in the troops"
put them in your declaration and watch what they do
giving you access to servos and motors... and soon
You can mash up your own code, and you can shoot for the moon

It doesn't really matter what you do
You too can learn to program, hey, does that compute?
From Snoop Doggy Dog to Betty Boop
We've all got a place in this robotics group

No comments:

Post a Comment