Wednesday, November 1, 2017

Module 10

Step 1: Touch Sensor Intro


Make your robot respond to touch


Step 2: Move Steering with Touch Sensor


Move steering Block


Step 3: Colour Sensor

Example 1
Example 1 wanted us to create a colour sensor code that was a solid bright orange colour until an ambient light intensity greater than 50 was introduced. Once this happened, the orange light was meant to then flash on and off until the light intensity then went back under the threshold. In the end this program was unable to work as our colour sensor was never able to get above and then back under this desired threshold. 

Example 2
Example 2 wanted to create a colour sensor code that stopped the robot from spinning. If it did not detect a reflected light intensity < 50 and motor B had already rotated 2000 degrees, it would also stop. We were also unable to get the colour sensor to locate a light intensity above the threshold, causing each of our test runs to stop after the robot rotated 2000 degrees. 

Step 4: Infrared Sensor
Example 1


Example 2



Step 5: Coding Challenges 
Moving in a tight circle


Challenge 2:
We were unable to make the robot roam around the room randomly but what we created, in code only, was that the robot moved forward at a slow pace until it sensed an object infant of it at around 50 units. then it would stop and start turning to the right until it no longer sensed an object in front of it. Then it would begin moving forward again until another object appeared in front of it.

Challenge 3:
We created a code that allowed the robot to roam forward until the colour sensor met with a white line. To do this we made the robot just move forward until a white colour was introduced to the colour sensor. Our problem however was that the colour sensor was unable to figure out the colour white from all others, causing our robot to cross the line and never stop moving.

Challenge 4:
We created a code that made the robot move forward until it met with a white line, the colour that outlines the Dohyo arena, and when it did it rotated a 120 degrees. This degree was created so that it would roam around the circle in an "unpredictable" way so that it didn't bounce back in forth in a straight line as it would if we chose 180 degrees. This also did not work because our colour sensor was unable to figure out the difference between the red and white colours of the Dohyo. This caused our robot to continue moving forward and fall right out of our test area, which in the real event would be the Dohyo itself.

No comments:

Post a Comment