# Robotics | Programming Robot to Track Continued

In this class, all of our robots were broken, however we learned valuable lessons/skills about fixing and debugging robots. We also learned about problem solving, and through trial and error we were able to learn how to find and solve the problems. In the end, we did not solve the problem, but we made many theories and hypotheses as to why they wouldn’t work. We also learned a great lesson about teamwork, and how after working together we were able to progress our problem solving faster. ðŸ™‚ ðŸ™‚

# Robotics | Programming Robot to Track

There are/were many problems with our robot, so we spent the lesson guessing and checking speeds. Our shaft encoders are broken, so we ended up programming the robot to move using the motor speed and time. After many technical glitches and problems, we ended up solving them, and making our robot move along the length desired.

# Robotics | Shaft Encoder Investigation

What is a shaft encoder?

A shaft encoder is a device used among VEX parts to count the amount of rotations on a connected shaft/axle. It is also referred to as a rotation sensor.

How does it work?

The encoder starts with a value of 0, and it goes to 360 depending on the amount of rotation. It also goes down depending on the direction.

How do we code it in RobotC?

You need to have some code to configure the sensors, but it is written automatically when the sensors are connected/when you load the sample program. You then have to make a while loop for the encoder to record.

Why is it better to use a shaft encoder?

Without it, you can’t make precise movements tuned to the amount of rotations an axle would make. You’d have to guess using the speed and time.

# Robotics | Labyrinth

Programming my robot to navigate the labyrinth was quite difficult. I had to go to the website on Schoology to see how to actually make the robot perform more than one action, and from there it was all trial and error. I had to test different times and speeds before I was sure it would work, but eventually I got it to work. ðŸ™‚

My virtual robot:

My code: