Difference between revisions of "FTC Make Coding Easier with Methods 20231025"

From wikidb
Jump to: navigation, search
(Refined Demo Code)
Line 5: Line 5:
 
* Makes code more reliable by allowing us to use the same code over and over.
 
* Makes code more reliable by allowing us to use the same code over and over.
  
= Refined Demo Code =
 
  
'''TBD''': Complete code refinements and integrate into this lab.
+
== Check Points ==
  
* [https://github.com/edcepp/DeLaSalle/blob/main/DriveMecanumEpp.java DriveMecanumEpp.java]
+
Start with the program you modified in the [[FTC Set Up the Mecanum Training Platform 20231025]] lab.
  
Simplified PowerUpMotors to us Ticks for distance and velocity. Add GoForward and GoSideways helper methods
+
=== Check Point 1 ===
 
+
== Check Points ==
+
  
# Compute how many Ticks per millimeter the robot move forward.
+
* Modify the program to move in a square by calling the GoForward and GoSideways methods.
## Sidesize
+
## Why are they different
+
# Find a web reference computer these values based on Mecadum wheels size and motor configuration
+
# Do the computations and compare with your test results
+
# Measure how well the moveForward method drove the robot straight
+
## How does speed and distance impact
+
  
 
== References ==
 
== References ==

Revision as of 12:17, 31 October 2023

Why Use Abstraction

  • Makes the program easier to think about
  • Makes is easier to test programs - we can test small part individually
  • Makes the code easier to user over and over saving time. We can more easily takes code from one program and use it somewhere else.
  • Makes code more reliable by allowing us to use the same code over and over.


Check Points

Start with the program you modified in the FTC Set Up the Mecanum Training Platform 20231025 lab.

Check Point 1

  • Modify the program to move in a square by calling the GoForward and GoSideways methods.

References

Using the Android Debugging Bridge to Locate Bugs

TBD: Move to its own section - add instruction and ...

Check Points

TBD

Additional References

To be screened.