Skip to content

Instantly share code, notes, and snippets.

Avatar

Scott Numamoto scottnuma

View GitHub Profile
View holonomic.py
left = '47242536251659126000890'
right = '47257303962492263297599'
down = '47254280750988421370725'
up = '47257525192632122028127'
def autonomous_setup():
Robot.run(test_limits)
def drive_up():
Robot.set_value(up, "duty_cycle", 0.5)
@scottnuma
scottnuma / hardware-test.py
Created Mar 9, 2018
Code to test robot hardware.
View hardware-test.py
"""Code to just run the motors.
This code requires no gamepad and will only attempt to make the
motors spin. Useful for debugging hardware issues on robots.
"""
# Update motor values below
left_motor = ""
right_motor = ""
@scottnuma
scottnuma / move.py
Created Feb 6, 2018
Minimum code for a driving base kit
View move.py
# Update motor values below
left_motor = "47245533815105973122875"
right_motor = "47254280750988421370725"
def autonomous_setup():
print("Autonomous mode has started!")
def autonomous_main():
pass
@scottnuma
scottnuma / KewlLinks.md
Last active Aug 25, 2016
Kewl Links for Incoming UC Berkeley Freshmen
View KewlLinks.md
View Python.md

#How to use Python:

This assumes that you've already installed Python (which most of you have). If you haven't, download the python 2.7 installer from here

  1. Open up "IDLE (Python GUI)". You'll probably be able to find it by searching with the Windows Button

  2. Create a new file with File > New File.

  3. In the window that popped up (not the previous window with ">>>"), type

     print("Hello world!")  
    
@scottnuma
scottnuma / vector.py
Last active Feb 18, 2016 — forked from mcleonard/vector.py
A vector class in pure python.
View vector.py
"""
The MIT License (MIT)
Copyright (c) 2015 Mat Leonard
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
You can’t perform that action at this time.