Show Menu
Cheatography

Team 1418's FRC Cheat Sheet Cheat Sheet by

General Reference

RoboRIO Address:
robori­o-1­418­-fr­c.local
Default Gateway
10.14.18.1
Robot Router SSID:
1418

Docume­ntation

Veiwing Network Tables

Use
Network Tables are used like a print statement for the robot. We are able to view the values being pushed into network tables from out laptops

Pushing Data to Network Tables
Create new table (Usally in robot init)
self.sd = Networ­kTa­ble.ge­tTa­ble­('S­mar­tDa­shb­oard')
Push value (In robot loop)
self.s­d.p­ut­Num­ber­("Value name", value))

Viewing Network Tables
1) Install robotpy's eclipse plugins
2) Connect to the robot's router on your laptop
3) Open eclipse and got to WPILib > Run Outline Viewer
4) Enter a host of: robor­io-­141­8.l­ocal
5) Click Start Client

Python

Statements
if expre­ssion:
    sta­tements
elif expre­ssion:
    ­sta­tements
else:
    ­sta­tements

Loops
while expre­ssion:
 ­ ­sta­tements

for var in colle­ction:
 ­ ­sta­tements

for i in range(­st­art, end):
 ­ ­sta­tements
 

Git

Pull Changes:
git pull
Add a File:
git add <file name>
Remove File:
git rm <file name>
Move FIle:
git mv <file name> <new file name/p­ath­>
Commit:
git commit -m "­<insert comment here>"
Push:
git push <re­po/­rem­ote> <br­anc­hna­me>
Check Status:
git status

Command Line / Terminal

Change Folder­/Di­rec­tory:
cd <folder name>
List Files:
ls
Delete File:
rm <file name>
Move File:
mv <file name> <new file name/p­ath­>
Create Folder:
mkdir <folder name>

Python Robot Simulator

Use
BEFORE deploying code to the robot or pushing code to git make sure to test your code in the pyfrc simulator. This makes sure that your code will not crash the robot and can also be helpful when developing code at home away from the robot.

Running Simula­tor
1) Navigate 2016-­rob­ot/­robot/
2) Run the simulator with python3 robot.py sim

Deploy To Roborio

Depl­oying
1) Change your wifi to the robot's wifi 1418
2) Navigate to the 2016-­rob­ot/­robot/ directory in terminal.
3) Use command python3 robot.py deploy to start deploying.
4) Use the robot address robor­io-­141­8.l­ocal when prompted

Tests
If no tests are in the 2016-­rob­ot/­tests/ directory then your will have to deploy with --bui­ltin

Trou­ble­sho­oting
Update pyfrc: pip3 install --upgrade --user pyfrc
 

Comments

Resurgence-Robotics 1080 likes this idea! hope you don't mind if we make a similar sheet :)

Resurgence-Robotics 1080 likes this idea! hope you don't mind if we make a similar sheet :)

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          More Cheat Sheets by carter.fendley

          Packet Tracer Cheat Sheet