This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.firstinspires.ftc.teamcode; | |
import com.qualcomm.robotcore.eventloop.opmode.OpMode; | |
import com.qualcomm.robotcore.eventloop.opmode.TeleOp; | |
import com.qualcomm.robotcore.hardware.DcMotor; | |
/** | |
* This is based on the helpful write-up at | |
* https://www.roboteq.com/index.php/component/easyblog/entry/driving-mecanum-wheels-omnidirectional-robots?Itemid=1208 | |
* which itself is pulled from the Simplistic Control of Mecanum Drive from Ian McInerney, FRC Team 2022: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Musical Stairs | |
* | |
* The core assumptions of this code mostly have to do with the sequence in which the | |
* XSHUT pins are wired together: | |
* | |
* 1. All of the XSHUT pins are contiguous on the Arduino, starting at XSHUT_OFFSET. | |
* 2. The pins are ordered L1, R1, L2, R2, ... , L10, R10 | |
* | |
* At the moment, we are triggering a note to be played if REQ_CONSECUTIVE_BREAKS consecutive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Wire.h> | |
#include <VL53L0X.h> | |
const int NUM_SENSORS = 5; | |
const long SENSOR_TIMEOUT = 25; | |
const long MAX_TESTS = 100; | |
const long MAX_DURATION = 300000; | |
const int XSHUT_OFFSET = 2; // first XSHUT pin | |
VL53L0X sensors[NUM_SENSORS]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Wire.h> | |
#include <VL53L0X.h> | |
const long SENSOR_TIMEOUT = 500; | |
const long MAX_TESTS = 1000; | |
const long MAX_DURATION = 300000; //ms | |
VL53L0X sensor; | |
int count = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect -f | |
set screen "tt-rss" | |
set prompt "$" | |
set ttrss "~/public_html/tt-rss" | |
# open a new screen (reusing any existing 'tt-rss' screen) | |
spawn screen -D -R "$screen" | |
expect "$prompt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# usage: iTunesLibraryToggle [library] [playlist] | |
# e.g. iTunesLibraryToggle "$HOME/Music/iTunes (Music & Audiobooks)" Audiobooks | |
iTunesLibraryToggle() { | |
# make sure the iTunes directory is, in fact, a symlink | |
iTunesDir=$HOME/Music/iTunes | |
if [[ ! -d "$iTunesDir" || -L "$iTunesDir" ]] ; then | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$filename = "calendar"; | |
if (isset($_GET["url"])) { | |
$url = $_GET["url"]; | |
if (!isset($_GET["show_url"])) { | |
preg_match("|.+\/([^?]+)\??|", $url, $matches); | |
if (isset ($matches[1])) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/********************************************************************** | |
* Google Reader to Wordpress | |
* | |
* 2011-11-27 | |
* Seth Battis (seth@battis.net) | |
* | |
* This script takes the output of Google Reader's JSON export of | |
* shared items and converts it into an XML file that can be imported | |
* into a Wordpress blog as posts. All of the data in the original JSON | |
* file is preserved in the XML file, either by transfering it to |