Here is my resulting project:
void main()
{
while(digital(1)==0)
{
fd(A);
fd(C);
if(digital(1)==1)
{
beep();
bk(A);
bk(C);
sleep(0.5);
fd(A);
bk(C);
sleep(0.5);
}
}
}
So for those of you who can't read IC, it makes 2 motors go forward until the touch sensor is pushed in, then it moves backwards and diagonally for .5 seconds, then proceeds to move forward again.
Monday, December 22, 2008
Tuesday, December 16, 2008
First Touch Sensor Program
Here is my first touch sensor program, let's hope this works!
void main()
{
while(digital(1)==0);
{
fd(A);
fd(C);
if(digital(1)==1);
{
beep();
}
}
}
void main()
{
while(digital(1)==0);
{
fd(A);
fd(C);
if(digital(1)==1);
{
beep();
}
}
}
Monday, December 8, 2008
Touch sensor beginner guide
http://www.kipr.org/curriculum/touch.html#anchor701290
*NOTE* The sensor ports on the RCX processor are 1, 2 and 3 (Motor ports are A, B, and C, LEGO sensors will not work in these ports).
Good site for IC: http://www.owlnet.rice.edu/~elec201/Book/icmanual.html
*NOTE* The sensor ports on the RCX processor are 1, 2 and 3 (Motor ports are A, B, and C, LEGO sensors will not work in these ports).
Good site for IC: http://www.owlnet.rice.edu/~elec201/Book/icmanual.html
Friday, December 5, 2008
This week - Next week
THIS WEEK
This week was pretty successful. Our teacher helped us make our first program so I really saw what Interactive C looked like for the first time. Now I'm making my first basic program that makes the motors of a Lego RCX go forward, back, turn off, brake, and such. I Googled "Interactive C" and I found a few guides, but the best one I found for beginners was http://www.kipr.org/curriculum/programming.html. It talks about the fundamentals of basic beginner programming.
NEXT WEEK
Next week I'll be expanding on this program, or starting a new one to see what the RCX is capable of. The thought of having touch sensors on the RCX intrigues me. I'll see what kind of tutorials I can find about them. I'd like to make the RCX turn a direction when the touch sensor it touched.
Monday, December 1, 2008
Goals this week
For this week, this class meets three times. By the end of the week, I should have a working program on a Lego RCX (written in IC). I'll be needing to do some surfing to find out how Interactive C works, like simple commands, how to start a program (what to type at the beginning, when to use parenthesis, etc.), and anything that are essential to have a descent working program. I got to see some code last class with a simple first program we made on the RCX, it displayed text and made 2 motors work for a period of time then slept. Something like that interests me, I need to know how to make a simiar re-creation of that project by the end of the week.
Tuesday, November 25, 2008
We wrote a simple program.
We wrote a simple program.
//steph
//hello steph.ic
void main()
{
printf("wtf");
sleep(2.0);
fd(1);
bk(2);
sleep(4.0);
ao();
}
//steph
//hello steph.ic
void main()
{
printf("wtf");
sleep(2.0);
fd(1);
bk(2);
sleep(4.0);
ao();
}
Goals 2
- What have you done on your project?
-I have begun to explore what a Roomba is capable of, I've seen a bunch of different add-ons for the Roomba. Our teacher, Mr. Connors, has a board with a Gameboy SP connection to it that can connect to a camera that can pick up colors and will turn and scroll its way towards the specific color.
- What do you need to do on your project?
-I need to start learning different commands in Interactive C so I can know what and where I want to go with the Roomba project. I'm going to see if it's possible to make a temporary memory in the Roomba to make it remember the places it has hit to make a virtual blueprint of the room it's in. - What do you need for your project?
-I have the materials needed to begin a basic hack/program for a Roomba. We have several Roombas (1 newer and about 2 older ones), the internet is an obvious source and a great way to learn interactive C.
Wednesday, November 19, 2008
My Goals in C++
GOALS
- My goals are to learn how to program in C++ or Interactive C.
- In detail; to learn an a language to move objects on the screen or move physical objects, such as a Roomba. I think doing something with a Roomba would be good because it has touch sensors that we might be able to program to do other things upon being touched.
- I would think of Thanksgiving as a checkpoint to see how work is going. I think Christmas would be a good deadline because it isn't that far away, but there is certainly enough time to get sufficient work done. And end of term would obviously be the final deadline to turn in/show all work.
- I have my computer to work with, all of the books my teacher has on different programming languages. There are a lot of books in the classroom with knowledge that I could use to my advantage. They seem like they are for beginners like me, so that is ideal.
- I will require a teacher to help me if I can't understand something, and a computer is obviously of great use. I'm sure there are a vast amount of sites that have tutorials on how to use C++ and interactive C. Again, the programming books will help.
- My progress can be shown at any time in the classroom. If one asks me to see what I have, I can show easily what I have been working on.
- I will know if my goals have been reached if I have a working program that does exactly what I want it to do. It would have minimal problems, it might have complex code in it, and hopefully have good feedback from peers, classmates, etc.
- My projects will be shown through a projector in our classroom or through the computer I'm working on if possible. Or if it is a physical object, like a Roomba, it will be shown in the "robot arena" in our classroom.
Subscribe to:
Posts (Atom)