Today’s class was new and it seemed to be interesting. The truth is, it was interesting but we only felt that way after we had almost banged our heads into the walls from frustration :( . I don’t know about my other classmates but for me it was a bit challenging. We had to write two programs that would make our Boe-Bots go in a circle and in a triangular shape. It was kind of a new thing to learn, because usually we wrote programs that involved our Boe-Bots performing maneuvers in a straight path or turns of exact 90 degrees. I started working with the easy one first, which was the circle. I started to type down the program and here it is:

‘ Robotics with the Boe-Bot – Circle.bs2

‘ Boe-Bot navigates a circle of 1 yard diameter.

‘{$STAMP BS2}

‘{$PBASIC 2.5}

DEBUG “Program running!”

pulseCount      VAR         Word                                                                                            ’ Pulse count to servos

FREQOUT 4, 2000, 3000                                                                                                    ’ Signal program start/reset.

‘ —–[ Main Routine ]————————————————

Main:

DO

PULSOUT 13, 850                                                                                                                  ’ Veer right

PULSOUT 12, 716

PAUSE 20

LOOP

Of course when you write down the program, you will have to to change the the right PULSOUT  Value, so that right wheel can increase speed or decrease according to the distance you kept as the circles diameter. For example: If you wanted it to go round and round with a diameter distance of 4 inches, then you will have to increase the right PULSOUT Value but if you want it to go for like turn round for like 12 inches then you will decrease the right PULSOUT Value. For my self I chose to make my Boe-Bot go round and round with a diameter distance of 36 inches which is 1 yard, so i decreased my right PULSOUT Value to 716. After that I ran the program, it went in a really huge circle which had a diameter of 36 inches. This means whenever you want your Boe-Bot to perform a circle, first you have to chose  how big the circle you want it to be and from that point onwards you can alter the right PULSOUT Value making the Boe-Bot go in big circles(decrease value) or small ones(increase value).

Then I started off to finish my one and last program in this chapter, which was making my Boe-bit perform a triangle. This program was a bit hard because making the Boe-Bot go in exact equal turns was hard. I wanted my Boe-Bot to turn an angel of 60 degrees, which means the other turns would be also a 60 degree (An Equilateral Triangle). Yes, you would say whats hard about that, whenever its a left or right turn just keep the same pulseCount EndValue in the right. Well, it didn’t work for me when I tried the 60 degree angel, so I went for the one that my other classmates used which was the 120 right turn degree angel. When you type down the program, first you have  to calculate the number of pulses required for a one meter, or 1 yard straight line. I used 36 inches which is = 1 yard. I found the distance that my Boe-Bot would roll straight for and then I Adjusted the pulseCount EndValue in the Right_Rotate120 subroutine to get a precise 120 degree turn.

When I ran the program it went just fine, I don’t know what was the problem for the 60 degrees turn. Either I didn’t spend enough tome working on it or the fact that there  was something fishy about this 60 degree turn. I wanted to go back and try again and see where I did a mistake but the class already has ended. I had to admit that it was fun but then when typing down these kind of programs, a person should have lots of patience, because all this journey is about errors and trials. You have to keep on trying again and again until it finally works :) :) .