Thursday, December 8, 2022

ACA Robotics Programming

 

. Review the Documentations:

If you have already known the configuration of the expansion hub/control hub, You can ignore this section. Expansion Hub with Android Device Robot Controller - DUO Control System (revrobotics.com)

Keep this diagram in mind:

Wiring Diagram - DUO Control System (revrobotics.com)

 program file you wrote follow the name convention :

 yourunique prefix||originalfilename.Java. 

For the FTC library name convention, please review this link.

 not to overwrite other’s configuration file)


3. Run/Debug your code

Copy and paste your java file to OnBot java on the web browser. Http://168……
Run the code 

4. Test the code via driver station 

5. Change the code
Make at least one Change to the log ice of the code. Eg: add a count variable to display how many times the robot component(s) ran in the while loop. And run your new code via driver hub.


——-/—/———done the tasks for 2022-12-08———-/——/

Programming tutorial for Teleop session 

 Programming the Autonomous session:


Basics of Programming with Encoders

STOP_AND_RESET_ENCODER Mode

Place a motor in this mode when you want to set its encoder position back to 0. The motor will stop. To start it again, you need to place the motor into one of the other three modes. It is recommended to place each motor you will be using encoders with into this mode at the start of each program, so that you know what position the motor is starting out in.
RUN_WITHOUT_ENCODER Mode

Use this mode when you don’t want the Control Hub to attempt to use the encoders to maintain a constant speed. You can still access the encoder values, but your actual motor speed will vary more based on external factors such as battery life and friction. In this mode, you provide a power level in the -1 to 1 range, where -1 is full speed backwards, 0 is stopped, and 1 is full speed forwards. Reducing the power reduces both torque and speed.
This mode is a good choice for drivetrain motors driven by joysticks on the gamepad.
RUN_USING_ENCODER Mode

In this mode, the Control Hub will use the encoder to take an active role in managing the motor’s speed. Rather than directly applying a percentage of the available power, RUN_USING_ENCODER mode targets a specific velocity (speed). This allows the motor to account for friction, battery voltage, and other factors.

This mode is a good choice for operations, like a flywheel, that require a specific speed and can use buttons on a gamepad for control.
RUN_TO_POSITION Mode

In this mode, the Control Hub will target a specific position, rather than a specific velocity. You still set a velocity, but it is only used as the maximum velocity. The motor will continue to hold its position even after it has reached its target.

DriveTrain Motors

Drivetrain Motors on Drivetrain Movement (two wheel driving) 


--——————-

Use tag 
-----

Camera


------


https://youtu.be/NqRiXfuj-Dw camera images testing







We are the Winner at the regional tournament !

  https://youtu.be/mseGfEwSrX4