Friday, 27 May 2011

Create a Flowcode control design

I am going to talk about how i created the following codes.




Below is the code I used for the video above.








This is where the LED flashes “0” to “7” and back to “0” this is looped three times. There are no other movement.

The LED stops and spins left, as shown by the arrow and the power for the left and right motors which are -255 for the left and 255 for the right

This is where the robot spins right, as shown by the arrow and the power for the left and right motors which are 255 for the left and -255 for the right

This is where the LED flashes “0” to “7” and back to “0” this is looped three times. There are no other movement.



The LED stops and moved forward, as shown by the arrow and the power for the left and right motors which are 255 for the left and 255 for the right





This is where the buggy spins left, as shown by the arrow and the power for the left and right motors which are -255 for the left and 255 for the right

This is where the buggy moved forward, as shown by the arrow and the power for the left and right motors which are 255 for the left and 255 for the right


This is where the buggy spins left, as shown by the arrow and the power for the left and right motors which are -255 for the left and 255 for the right

This is where the buggy stops moving.

The program went to plan but apart of couple of things. I was not able to make the buggy do two commands at once, i.e. move and flash LED at once. I overcame this problem by making the LED flash before each movement.
The only problem I had was that when the buggy started to move, "LED 0" will not switch off. Also at the start when the buggy started spinning it spun too slow. I also had a problem with different buggy moving in a straight line.
Another problem I had was with the software, i had to st the speed correct to make the buggy go in a straight line of turn a certain degrees to the lift or right
I could have made the buggy respond to distance and light to it would act more as a vacuum cleaner.
But over all programming the buggy was a success apart from a few hiccups.

No comments:

Post a Comment