Releases: kreier/vex
Function goto() based on GPS
Start point location and direction agnostic code
2022-05-04
The old code used the drivetrain.turn_to_heading()
function with the heading based on the internal gyroscope. Therefore 0 is always the direction your robot starts with. If you change your initial start conditions, because you want to improve the timing, the complete code breaks.
The upgraded code determines the direction of the robot based on the GPS location, no matter the direction of the robot itself, but relative to the field. Hopefully this improves repeatability over the 60 seconds period of time too. It then uses drivetrain.turn_for()
to make the needed change in direction.
Historic releases
v0.4 Code efficiency with an array
2022-04-12
The previous version v0.3 used a long list of goto(x, y, r)
parameters. Better put these variables into an array, then let a for loop complete these coordinates. Avoid repeating code, put path into array.
v0.3 New goto(x, y, direction) function
2021-12-09
This version does not set a new record (old 170 points after 60 seconds) but is relatively faster: 130 points in just 30 seconds! Additionally it has the new finished goto(x, y, direction)
function to provided an easy to read instruction code with just the waypoints.
v0.2 Using Time effectively, we got 60 seconds
2021-11-25
With the function 'move(direction, coordinate, reverse)' and increased speed we relocated two more goal posts for a new score of 172 points.
v0.1 Initial Release
2021-11-15
First working version with a self-written function, using the GPS sensors to check the location and display the variables. Scores 130 to 132 points and has 10 seconds left.
Versions not released
Some early attempts from September 2021 can be found in the 2021-22 folder.
With only 43 points, following a sequenced approach it became increasingly difficult to predict later locations and stages, as small errors with driving over a ring in the early seconds altered the final location significantly.
Another code example from October 2021 repeated many instructions to access the location with GPS and display the current location.
Version 0.4
Avoid repeating code, put path into array
The previous version v0.3 used a long list of goto(x, y, r)
parameters. Better put these variables into an array, then let a for loop complete these coordinates.
Previous versions
Version 0.3 - Using the new goto(x, y, direction) function
This version does not set a new record (old 170 points after 60 seconds) but is relatively faster: 130 points in just 30 seconds!
Additionally it has the new finished goto(x, y, direction)
function to provided an easy to read instruction code with just the waypoints.
Version 0.2 - Using Time effectively - we got 60 seconds
With the function 'move(direction, coordinate, reverse)' and increased speed we relocated two more goal posts for a new score of 172 points.
Version 0.1 - Initial Release
First working version with a self-written function, using the GPS sensors to check the location and display the variables. Scores 130 to 132 points and has 10 seconds left.
Versions not released
Some early attempts from September 2021 can be found in the 2021-22 folder.
With only 43 points, following a sequenced approach it became increasingly difficult to predict later locations and stages, as small errors with driving over a ring in the early seconds altered the final location significantly.
Another code example from October 2021 repeated many instructions to access the location with GPS and display the current location.
Version 0.3
Using the new goto(x, y, direction) function
This version does not set a new record (old 170 points after 60 seconds) but is relatively faster: 130 points in just 30 seconds!
Additionally it has the new finished goto(x, y, direction)
function to provided an easy to read instruction code with just the waypoints.
Previous versions
Version v0.2 - Using Time effectively - we got 60 seconds
With the function 'move(direction, coordinate, reverse)' and increased speed we relocated two more goal posts for a new score of 172 points.
Version v0.1 - Initial Release
First working version with a self-written function, using the GPS sensors to check the location and display the variables. Scores 130 to 132 points and has 10 seconds left.
Versions not released
Some early attempts from September 2021 can be found in the 2021-22 folder.
With only 43 points, following a sequenced approach it became increasingly difficult to predict later locations and stages, as small errors with driving over a ring in the early seconds altered the final location significantly.
Another code example from October 2021 repeated many instructions to access the location with GPS and display the current location.
Version 0.2
Using Time effectively - we got 60 seconds
With the function 'move(direction, coordinate, reverse)' and increased speed we relocated two more goal posts for a new score of 172 points.
Initial Release
Version 0.1
First working version with a self-written function, using the GPS sensors to check the location and display the variables. Scores 130 to 132 points and has 10 seconds left.
Versions not released
Some early attempts from September 2021 can be found in the 2021-22 folder.
With only 43 points, following a sequenced approach it became increasingly difficult to predict later locations and stages, as small errors with driving over a ring in the early seconds altered the final location significantly.
Another code example from October 2021 repeated many instructions to access the location with GPS and display the current location.