Skip to content

Instantly share code, notes, and snippets.


Vishal Devireddy TwoTau

View GitHub Profile
TwoTau /
Created Mar 26, 2019
Resource Management Research (CompSci HL)

Identifying and evaluating resources

Resources include:

  • processors (sound, graphics, CPU)
  • storage (primary, secondary memory, cache)
  • bandwidth (of peripherals, network)
  • bus bandwidth
  • screen resolution

Resources vary in mainframes, servers, PCs, laptops, netbooks, tablets, phones, cameras, and music players.

TwoTau /
Last active Nov 28, 2018
Ayy this is the Best Tree implementation
import java.util.Scanner;
public class BestTree<E extends Comparable<E>> {
private TreeNode overallRoot;
public BestTree(TreeNode root) {
overallRoot = root;
public BestTree() {
TwoTau /
Last active Sep 27, 2018
import java.sql.SQLOutput;
import java.util.*;
public class Main {
private static Set<String> words;
private static Map<String, Set<String>> neighbors;
private static final char[] ALPHABET = "qwertyuiopasdfghjklzxcvbnm".toCharArray();
TwoTau / binary_clock.ino
Created Aug 6, 2018
Code for a physical binary clock with an Arduino, an LED dot matrix, and an RTC module.
View binary_clock.ino
#include "LedControl.h"
#include <DS3231.h>
// Initialize the dot matrix and the clock
LedControl lc = LedControl(7, 5, 6, 1);
DS3231 clock;
void setup() {
// Start up and clear the matrix
lc.shutdown(0, false);
package org.usfirst.frc.team2976.robot.subsystems;
import org.usfirst.frc.team2976.robot.RobotMap;
import edu.wpi.first.wpilibj.AnalogGyro;
import edu.wpi.first.wpilibj.CANTalon;
import edu.wpi.first.wpilibj.Encoder;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.SpeedController;
import edu.wpi.first.wpilibj.command.Subsystem;
TwoTau / CANTalon
Last active Jan 11, 2017
How to configure a CANTalon
View CANTalon

Connect computer to roboRIO

  1. Connect your computer to the roboRIO's USB A port
  2. Go to command prompt and run ping
    • If the ping doesn't work:
      • Make sure the robot is turned on and powered
      • Ensure that you are connected via USB
      • Try a different computer
  3. Go to the address in Firefox (or IE)
    • Click "Tap here to active plugin" if Firefox blocked Silverlight from running
  4. Once the webpage loads, you should see something like this:
TwoTau / sensors.c
Created Sep 27, 2016
Shows how to use sensors with RobotC
View sensors.c
#pragma config(Hubs, S1, HTMotor, HTServo, none, none)
#pragma config(Motor, mtr_S1_C1_1, leftWheel, tmotorTetrix, openLoop, driveLeft)
#pragma config(Motor, mtr_S1_C1_2, rightWheel, tmotorTetrix, openLoop, driveRight)
#pragma config(Sensor, S2, gyroscope, sensorI2CHiTechnicGyro)
#pragma config(Sensor, S3, sonar, sensorSONAR)
#pragma config(Sensor, S4, compass, sensorI2CHiTechnicCompass)
int getCompass() {
return SensorValue[compass];