Skip to content

Instantly share code, notes, and snippets.

View ryanshoff's full-sized avatar

Ryan Shoff ryanshoff

View GitHub Profile
@ryanshoff
ryanshoff / sendcan.py
Created June 10, 2019 03:08
POC to control REV Robotics SparkMAX motor controllers from socketcan interface
import can
from time import sleep
# POC to control REV Robotics SparkMAX motor controllers from socketcan interface
# this demo assumes two controllers set with ids 1 + 2
# tested on firmware 1.1.33
devtypes = [
'Broadcast',
'RobotController',
@ryanshoff
ryanshoff / robot.cpp
Created September 7, 2018 04:10
single file diffswerve test
#include "WPILib.h"
#include "LiveWindow/LiveWindow.h"
#include "ctre/phoenix.h"
#include <iostream>
#define driveP 0.025
#define driveI 0.0
#define driveD 0.0
#define driveFR 0.045

Keybase proof

I hereby claim:

  • I am ryanshoff on github.
  • I am ryanshoff (https://keybase.io/ryanshoff) on keybase.
  • I have a public key whose fingerprint is A3CB A4B9 DD5B 7A69 8B51 B1AA 03C0 ACEB BE51 D201

To claim this, I am signing this object:

@ryanshoff
ryanshoff / winnercaptains.py
Created April 30, 2015 13:57
Print FRC winning alliance captains with years played from thebluealliance.com
import json
import requests
base_url = 'http://www.thebluealliance.com/api/v2/'
headers = {'X-TBA-App-Id': 'frc4143:winnercaptains.py:2'}
year = '2015'
print 'Alliance captains'
url = base_url + 'events/' + year