Reminders: [check the following before you start your program]
1. Plugging in the Cortex: Follow the ordering/procedure to minimize connection issues (see "connecting robot")
2. Mapping motors and sensors: be sure to map your motor to [port1]
a. If you are using two motors, use [port1] and [port10]
b. The button and touch sensor are mapped to Digital Sensor Ports
3. When using the Button Sensor - use the "untilBump" code command.
4. When using the TouchSensor - use the "untilTouch" code command.
5. Be sure to include // comments in your code, it will REALLY HELP you debug and EXPLAIN TO ME what you did
CODE SNIPPETS
1. This will run the motor in port1 for 30 seconds at half speed, in a forward direction...
2. This will start the motor at the touch of a button to act as a "gear" button to put the car into forward, reverse... (uses untilBump command)
3. This will start the motor when pressing the "button" and "stop" the motor when pressing the "brake" (touch sensor)
TURN THE LIGHTS ON
Here is a sample program that will turn lights on with the use of a button, the lights are digital ports - they are right adjusted when you put them into the cortex..
- -- - - - - - - - - - - - - - - - - - - - - -- -- - - - - - - - - - - - - - - - - - - - - - - - - - ---
711 Challenge Instructions
Now that you understand your distances and calculations for your All Terrain Tire you will be read to write the correct RobotC code to get you RobotCar from 711 to school using the calcs from that tire.
You will be writing a program that will start the motor(s), stop the motors, change directions and speed to get the care safely from 711 to a parking spot in Harvest Park.
People attempting TWO MOTORS will be turing the car by having the motors turn in opposite directions, relative to the direction they want to turn.
BASIC TURNING
Here is an example of how to get a car to turn - speeds need to be tested..