Coder Social home page Coder Social logo

gramgra07 / statemachineftc Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 2.02 MB

Easy to use FTC Program Library for autonomous architecture creation.

Home Page: https://gentrified-apps.gitbook.io/statemachineftc/

License: BSD 3-Clause Clear License

Java 56.34% Roff 8.48% GLSL 1.03% HTML 34.15%

statemachineftc's Introduction

description
Built for FTC robotics and Java programming for ease of autonomous programming.

StateMachineFTC

TeleOp mode is pretty straightforward for new teams, you use the gamepad to control the robot. Autonomous is not as easy to program but it isn't all the much different than TeleOp, you just have to pre-program what movements you want the robot to perform. StateMachine can help with this and make it easier to understand.

Enums

Enums are a way of creating a list of constants that can be used in a program. For example you could create an Enum of fruits and have it contain apples, oranges, and bananas. Another example could be types of cars, you could have a list of cars that are sedans, trucks, and SUVs.

Enums are a variable that is defined by the user, and has a list of constants the user defines.

In this implementation, we use Enums commonly named states, or autonomousStates.

enum States {
    STATE1,
    STATE2,
    STATE3,
    STATE4,
    STATE5,
    STOP,
}

In the case of autonomous, states could be things like drive forward, turn left, turn right, raise arm, etc.

These enums provide an advantage because they are easy to read and understand in comparison to just telling the robot exactly what to do when. It can also wait for specific input from the robot, which might be harder to implement with just hard coding autonomous.

Later we will use these states to control the robot during autonomous.

statemachineftc's People

Contributors

gramgra07 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.