Tuesday, March 8, 2016

Sciborgs Day 1

Our first task was to write a sketch that makes an LED flash the Morse code for SOS using functions to reduce repetition.  Here is our commented code.


Next, we had to set up the Sciborg. Our first Sciborg task was to download the code "single motor" from the class website and run it to see what it does. Our commented code and a video of the Sciborg after uploaded the program appears below. One problem we had was that gibberish was appearing in the printing window. We had to make sure to change the data rate in the printing window.



Challenge 1: Create a new sketch, based on the previous sketch, to run both motors simultaneously at the same speed. A picture of our code and a video of the result appears below. 


Challenge 2: What is the minimum speed that allows your Sciborg to move? For this task, we basically had to guess and check by entering different speeds and then running our program to zoom in on the minimum speed. We defined the minimum speed as a speed at which the Sciborg will move without eventually stopping (unless the program says to). We found the min speed to be about 85. A picture of our code and a video of the Sciborg appears below.

Challenge 3: Make a sketch that gets the Sciborg to make a hard turn. We accidentally overlooked the comment that said to accomplish this by making one motor full power forward, the other full power reverse. We instead accomplished this task by making both motors go the same direction, but one at a faster speed than the other. A picture of our code and a video of the Sciborg appears below.
Challenge 4: Make a sketch for making a gentler turn. We accomplished this by making a less dramatic speed difference between the two motors. A picture of our code and a video of the Sciborg appears below.
Challenge 5: Time how long it takes for the Sciborg to travel 10 feet. Write a sketch that makes the Sciborg travel for this much time and then stop. This was the most challenging task. Since there was too much friction with the floor for our Sciborg, we used 9 ft of the table for this task, Our Sciborg had something wrong that caused it to veer left when it was supposed to drive straight, We tried to counteract this by increasing the speed of the left motor, but the behavior was very erratic, and we could never get it to drive straight, Thus, it took a different amount of time each trial to reach the 9 ft mark. Once we decided on the best time value we could get and programmed it into the Sciborg, it would always stop right before the line or right after, depending on how much it deviated from a straight path. A picture of our code and a video of the Sciborg appears below.

2 comments:

  1. I liked how you thought of changing the speed of the motor in order to try to get your SciBorg to move in a straight line.

    ReplyDelete
  2. Your blog is very pretty. I also like how you go chronologically through your tasks.

    ReplyDelete