Challenge 8: Spirograph
- rainbowsandalex
- Apr 14, 2016
- 2 min read
Step 1: Make a list of program requirements/assumptions/restrictions
Requirements :
-Must be sure that the robot moves in same way each time with different angle
-Must be able to hold a pen and have it drag smoothly
-Must have the change of angle always the same
-Must be able to complete the movement at least 8 times to make a proper spirograph
Assumptions:
-Assuming that it will make a curve, then make the same curve repeatedly at different angles
-Assuming that it will be possible to make small enough movements as not to make the spirograph too large
Restrictions:
-Could be hard to make small enough turns
-Could be hard to loop it smoothly enough
-Could be hard to keep paper steady while robot is moving
-Could be hard to come up with a shape that will work for creating a design
Step 2: Build a robot that can meet these requirements
This is how our pen is attached
Step 3: Write a test program to make sure the robot can meet the requirements
We used a code from an old challenge that simply drives the robot in a figure 8.
Using this we could see that the pen is able to draw a smooth line
Step 4: Write pseudocode to solve the challenge (include the goal or program and detailed steps)
- Make a wide turn, so you end up having gone just slightly over a half oval
- Make a tight turn so the robot ends up facing further to the left than it would have to to complete the shape perfectly
-Make the same wide turn as before, ending in a different spot than the previous one
- Loop this process until you are satisfied with your design
Step 5: use pseudocode to write a program:
We ended up with a very simple program. We did not think to leave any comments in the program itself because there is not very much happening, but it does work very well.
This is how it looked
The first block makes a very wide right turn for one rotation
The second block makes a very tight right turn for 0.8 of a rotation
These two blocks loop a total of 17 times
Step 7: Debug
There was not much to debug, it seems to work properly without changing anything
Step 8: Final test
This was our final result
Reflection:
I'd say I learned quite a bit during this challenge. I learned the importance of making the actions precise, as well as how to modify the actions in such a way that it will affect the robot slightly enough to fix the problem without completely changing what it is doing.
I would say the programming itself went really well once we got the hang of it, we were able to think of what we could do to improve it and make it exactly how we wanted.
The building was a little bit more difficult. We ended up rebuilding our pen-holding attachment entirely once, and modifying it more times than that.
Luckily it ended up working fine in the end
My goals for the next challenge would be to get it done quicker, and maybe be a little more creative with it, as opposed to just completing it the simplest way we could think of.






Comments