- Install Tampermonkey
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 python3 | |
''' | |
Greybots Environment Installer | |
''' | |
from argparse import ArgumentParser | |
from inspect import getdoc | |
from os import chdir, path as ospath | |
from pathlib import Path | |
from shutil import rmtree |
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
#pragma config(Sensor, port2, statusLED, sensorVexIQ_LED) | |
#pragma config(Motor, motor1, leftMotor, tmotorVexIQ, openLoop, driveLeft) | |
#pragma config(Motor, motor6, wristMotor, tmotorVexIQ, openLoop, encoder) | |
#pragma config(Motor, motor7, rightMotor, tmotorVexIQ, openLoop, reversed, driveRight) | |
#pragma config(Motor, motor9, fourBarMotor, tmotorVexIQ, openLoop, encoder) | |
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*// | |
/** | |
* IntakeAssembly control modes. | |
*/ |
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 <iostream> | |
#include <cmath> | |
using namespace std; | |
float F16ConvertToF32(uint16_t f16) | |
{ | |
float f32 = 0; | |
unsigned sign = (f16 & 0x8000) >> 15; //extract out the sign | |
unsigned exponent = ((f16 & 0x7C00) >> 10); //extract out the exponent |
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
import matplotlib.pyplot as plt | |
import numpy as np | |
import time | |
max_ah = 18 # Maximum Amp Hours of the batteries | |
dt = 0.01 # Time delta for graph points | |
res = 0.5 / 1000 # Internal Resistance | |
tol = 0.01 # Tolerance/Delta between the 2 battery voltages before stopping | |
# Ask user for state of charge percentage |
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
#! /bin/sh | |
echo "What disk do you want" | |
echo "to wipe? For example - da1 :" | |
read disk | |
echo "OK, in 10 seconds I will destroy all data on $disk!" | |
echo "Press CTRL+C to abort!" | |
sleep 10 | |
diskinfo ${disk} | while read disk sectorsize size sectors other | |
do | |
# Delete MBR and partition table. |
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
// the setup routine runs once when you press reset: | |
void setup() { | |
//Set pins 8, 9, 10, and 11 (lower bits of Port B) to output | |
DDRB = 0x3F; | |
//set the reference voltage to match the scale of the input signal | |
analogReference(INTERNAL); | |
} | |
// the loop routine runs over and over again forever: | |
void loop() { | |
// read the input on analog pin 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
#!/bin/bash | |
# Script created by Vince Hunter | |
# Script updated by Chris Lawson 9/23/21 | |
### This allows the administrator password to be called, and used in the script where sudo is required | |
### Beware: the inputted password is used in echo commands | |
### Usage: Use `sudo` without a path to ensure the `sudo` function is called rather than the actual command | |
# Dialog Title |
This project is a simple way to repurpose a digital photo frame as a Home Assistant dashboard. The idea is to have a device that is always on and always connected to the Home Assistant server, so you can have a quick look at the status of your home automation system.
Here's a photo of the Nexfoto frame running Fully Kiosk Browser with Home Assistant: