Constants folder is a place where we indicate which port the sensors is pluck in.
It is a folder to implement all the motors and sensors. It is also where we get the value for all the sensors and the distances for encoder. We return the value to Shuffleboard.
This is a place where we program for the movement. In this folder we program things like move : forward, backward , left and right.
How it work ?
Implement the variable that I will be using
User input
initialize the value of the encoder and the angle.
program the movement
In this folder is where we call the drivecommands the folder that is said above.
It works in sequence like I can program it to go forward then backward and more.
Wall Following
All the movement involve sensors.
Wall following is a good way to move for the robot so it won't go off track.
The IR sensor is on the left so it will not crash to the left.
The Ultrasonic on the front will prevent the robot from crashing in front.
Another way of movement is to use PID( Proportional-Integral-Derivative feedback control ) . We can set the distance and the angle correction so the robot can maintain straight. It is better to use PID for movement once the robot gets heavier the normal movement maybe affected.