FTC Set Up the Mecanum Training Platform 20231025
From wikidb
Contents
Why
- Create a program testing platform. We want to create programs that we can copy to the competitions robot without modification.
Check Points
Check Point 1
Rename the Controller Hub
- Robot Controller Settings
- Robot Controller Name is OrRAS11-RC
Check Point 2
Down loading the Mecanum Demo Program
- Locate the the Drive Mecanum program in GetHub and copy it to your laptop. You will need internet access for this step
- Load the program into your robot
Check point 3
Pair the Driver and the Control Hub
See
- [https://www.youtube.com/watch?v=XOtzRAZ5HyM youtube of Connecting a Driver Hub to a Control Hub ==
Check Point 4
Connect and Configure the motors
- This program will not run correctly because it robot hardware needs to be configured for a different motor configuration.
- Configure these motors with the same I2C connections and motor names as the competition robot.
- Change the motor names in the java program to match the configuruation
- Build
- You can not test yet because the Driver Hub has not yet been configured.
Check Point 4
Update the Control Hub
- See Updating Control Hub
- Use the Google Chrome we browser - TBD double check
- You will need to install a program name REV Hardware Client
- Test
Update the Driver Hub
- See Updating Control Hub
- Test
test
control hub
driver hub
Sense - Think - Act loop
We have just implemented an Sense-Think-Act loop.
- Which code implements "Sense?"
- Which code implements "Think?"
- Which dode implements "Act?"
Photo credit:
- https://makezine.com/article/technology/robotics/choose-use-sensors-robot/
- https://youngzine.org/article-expert/technology/machines-sense-think-and-act
Configure a Color Sensor
Color Sensor Demo Code
Find this line of code
colorSensor = hardwareMap.get(NormalizedColorSensor.class, "sensor_color");
Physical Connection
- Connect Color Sensor to one of the I2C ports - 1 in this case
Configure Hardware
References
- See section: FTC_Read_Colors_20231017#Color_Sensor_Choices
- OnBot Java Guide: Electronics setup to Programming see chapter 11: Configuring Your Hardware
- Hardware and Software Configuration: Configuring a Color Distance Sensor - modify to work for a REV Color Sensor V3
Configuration File
- Control Hub
- I2C Bus 1
- Port 0 REV Color Sensor V3
- sensor_color
- I2C Bus 1
Example HW color senso configuration entry. Change ColorV3 to sensor_color for our examples.
From: https://docs.revrobotics.com/color-sensor/application-examples.