Difference between revisions of "FTC Power Up a Motor 20230911"

From wikidb
Jump to: navigation, search
(Created page with "= Core Resources = * [https://www.firstinspires.org/sites/default/files/uploads/resource_library/ftc/onbot-java-guide.pdf OnBot Java Guide] Chapters14, 15 and 16 (pages 78 to...")
 
(Example Configuration File)
 
(32 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Core Resources =
+
= Lab 1: Power Up =
  
* [https://www.firstinspires.org/sites/default/files/uploads/resource_library/ftc/onbot-java-guide.pdf OnBot Java Guide] Chapters14, 15 and 16 (pages 78 to 99) are focused on Creating and Running an Op Mode in OnBot Java.
+
== Core Resources ==
  
= Lab 1: Power Up =
+
* [https://www.firstinspires.org/sites/default/files/uploads/resource_library/ftc/onbot-java-guide.pdf OnBot Java Guide] Chapters14, 15 and 16 (pages 78 to 99) are focused on Creating and Running an Op Mode in OnBot Java.
  
 
== Why ==
 
== Why ==
Line 11: Line 11:
 
== Check Points ==
 
== Check Points ==
  
# Connect and power up an FTC Training Robot
+
# Power up the  FTC Training Robot
# Run the Test Motor Epp on the competition field
+
# Run the TestMotor app on the FTC Training Robot
 +
# Make the Training Robot do a slow turn to the right.
 +
# Make the Training Robot go faster.
 +
# Make the robot drive straight - if it isn't
 +
## Why might the robot drive to the left or to the right?
  
= Demo Code =
+
= HowTo - More Details =
  
== Finding Code on GitHub ==
+
== Power Up ==
  
* [https://github.com/edcepp/DeLaSalle/blob/main/TestMotorEpp.java TestMotorEpp.java]
+
# Power up Control Hub - wait for green LED
 +
# Power up the Driver Station
 +
## Run the FTC Driver Station app
 +
## Run the Test Motor Op Mode
 +
##
 +
# Be sure to power off the
 +
## Driver Station and
 +
## the Control Hub when  done
 +
# Be sure to change every thing
  
== Is the Demo Code on the Robot ==
+
== Running the Demo Code ==
 
+
* Make sure the robot is on
+
* Make sure the Robot Controller cell phone is on
+
* Make sure the "FTC Robot Controller" app is running
+
* Make sure your laptop Wifi is connected to the Robots Wifi
+
* Start a Web Browser on the laptop
+
* Connect to '''192.168.49.1:8080''' - if you are using a Expansion Hub
+
** 192.168.43.1:8080 - if you are using a Control Hub
+
* Select the OnBotJava tab
+
* Is TestMotorEpp.java in the Project Files list?
+
** Get help
+
 
+
= Running the Demo Code =
+
  
 
* Make sure the Driver Station cell phone is on
 
* Make sure the Driver Station cell phone is on
 
* Make sure the "FTC Driver Station" app is running
 
* Make sure the "FTC Driver Station" app is running
 
* Select the Autonomous dropdown menu (left triangle that points down)
 
* Select the Autonomous dropdown menu (left triangle that points down)
* Select the "Epp Motor Test" app
+
* Select the "motor test 9-23" app
 
* If the app is not in the list, you may need to "Build" it from the laptops web browser you used above
 
* If the app is not in the list, you may need to "Build" it from the laptops web browser you used above
  
= Checking the Robot Configuration =
+
== Finding Code on GitHub ==
  
Sometimes the configuration has a problem
+
* [https://github.com/edcepp/DeLaSalle/blob/main/TestMotors.java TestMotors.java]
 +
 
 +
== Connecting from a Laptop to the Robot ==
 +
 
 +
* Make sure the laptop is on the wifi network for your robot - one of these three
 +
** OrRAS01-RC
 +
** OrRAS02-RC
 +
** OrRAS03-RC
 +
* Start a Web Browser on the laptop
 +
* Connect to '''192.168.43.1:8080''' - if you are using a Control Hub
 +
** 192.168.49.1:8080 - if you are using a Android phones
 +
* Select the OnBotJava tab
 +
* TestMotor.java should be in the list autonomous programs
 +
* Build modified Op Mode programs by press the wrench button (lower right)
  
 
== Example Configuration File ==
 
== Example Configuration File ==
Line 59: Line 71:
 
***** REV Expansion Hub IMU: imu
 
***** REV Expansion Hub IMU: imu
  
== Reading and Modifying the Configuration File ==
+
== Move a Distance Using a Timer ==
 +
 
 +
'''TBD ''' Setting the stage for the Move a distance lab
  
'''TBD'''
+
* [https://ftcforum.firstinspires.org/forum/ftc-technology/android-studio/6607-best-way-to-have-the-robot-pause-in-loop-opmode Best way to have the robot pause in loop OpMode?]
 +
* Issue that arise when using power on different motors with difference characteristics. Addressed by using velocity
  
 
= Additional References =
 
= Additional References =
  
 +
* [https://www.firstinspires.org/resource-library/ftc/game-and-season-info Game and Season Info]
 
* [https://www.firstinspires.org/sites/default/files/uploads/resource_library/ftc/onbot-java-guide.pdf OnBot Java Guide] OnBot Java Guide
 
* [https://www.firstinspires.org/sites/default/files/uploads/resource_library/ftc/onbot-java-guide.pdf OnBot Java Guide] OnBot Java Guide
 
* [https://www.firstinspires.org/resource-library/ftc/technology-information-and-resources FTC Programming Resources]
 
* [https://www.firstinspires.org/resource-library/ftc/technology-information-and-resources FTC Programming Resources]
Line 71: Line 87:
 
** [https://www.youtube.com/watch?v=cRcdGPaZ70Y&list=PLEuGrYl8iBm7wW9gyxpLDhBJAOWDZid1P&index=3 registering and Installing an Op Mode - Java]
 
** [https://www.youtube.com/watch?v=cRcdGPaZ70Y&list=PLEuGrYl8iBm7wW9gyxpLDhBJAOWDZid1P&index=3 registering and Installing an Op Mode - Java]
 
* [https://first-tech-challenge.github.io/SkyStone/index.html FTC API reference]
 
* [https://first-tech-challenge.github.io/SkyStone/index.html FTC API reference]
* [https://github.com/FIRST-Tech-Challenge/FtcRobotController FTC SDK version 7.1]
+
* [https://github.com/FIRST-Tech-Challenge/FtcRobotController FTC SDK version 9.0]
 
* [https://www.youtube.com/watch?v=IEWxGbj0SII How To Set Up A Github Repository For FTC]
 
* [https://www.youtube.com/watch?v=IEWxGbj0SII How To Set Up A Github Repository For FTC]
 +
* [https://www.dillon3.k12.sc.us/resources/robotics/REV%20Control%20Hub%20Manual.pdf REV Control Hub Manual] By Dillion K to 12 maybe]

Latest revision as of 11:51, 2 October 2024

Lab 1: Power Up

Core Resources

  • OnBot Java Guide Chapters14, 15 and 16 (pages 78 to 99) are focused on Creating and Running an Op Mode in OnBot Java.

Why

  • Master basic operations

Check Points

  1. Power up the FTC Training Robot
  2. Run the TestMotor app on the FTC Training Robot
  3. Make the Training Robot do a slow turn to the right.
  4. Make the Training Robot go faster.
  5. Make the robot drive straight - if it isn't
    1. Why might the robot drive to the left or to the right?

HowTo - More Details

Power Up

  1. Power up Control Hub - wait for green LED
  2. Power up the Driver Station
    1. Run the FTC Driver Station app
    2. Run the Test Motor Op Mode
  3. Be sure to power off the
    1. Driver Station and
    2. the Control Hub when done
  4. Be sure to change every thing

Running the Demo Code

  • Make sure the Driver Station cell phone is on
  • Make sure the "FTC Driver Station" app is running
  • Select the Autonomous dropdown menu (left triangle that points down)
  • Select the "motor test 9-23" app
  • If the app is not in the list, you may need to "Build" it from the laptops web browser you used above

Finding Code on GitHub

Connecting from a Laptop to the Robot

  • Make sure the laptop is on the wifi network for your robot - one of these three
    • OrRAS01-RC
    • OrRAS02-RC
    • OrRAS03-RC
  • Start a Web Browser on the laptop
  • Connect to 192.168.43.1:8080 - if you are using a Control Hub
    • 192.168.49.1:8080 - if you are using a Android phones
  • Select the OnBotJava tab
  • TestMotor.java should be in the list autonomous programs
  • Build modified Op Mode programs by press the wrench button (lower right)

Example Configuration File

Warning : Incomplete, unclear, Untested, may be wrong

  • name: OrRAS
    • Webcam 1: 9BB6F610
    • Control Hub Portal: embedded
      • Control Hub
        • Motors
          • 0: REV Robotics Core Hex Motor: myLeftMotor
          • 1: REV Robotics Core Hex Motor: myRightMotor
        • I2C Bus 0
          • REV Expansion Hub IMU: imu

Move a Distance Using a Timer

TBD Setting the stage for the Move a distance lab

Additional References