This file contains hidden or 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 threading | |
import struct | |
import serial | |
import time | |
class OmegaSensor(object): | |
def __init__(self, comname): | |
self.comname = comname | |
self._stop = False | |
self.worker = None |
This file contains hidden or 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 <stdint.h> | |
#include <stdbool.h> | |
#define COULOMB_COUNT_POLL_INTERVAL 5000 // 5 seconds | |
#define COULOMB_REMOVAL_INTERVAL 2000 // 2 seconds | |
#define FUEL_GAUGE_ADDRESS 0x55 | |
#define FUEL_GAUGE_POWER_OK 0x01 | |
#define SYSTEM_TICK_MS 1 | |
// HAL Functions, assume these are defined elsewhere |
This file contains hidden or 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 <stdint.h> | |
#include <string.h> | |
#define UART_RX_BUFFER_SIZE 64 | |
#define COMMAND_BUFFER_SIZE 32 | |
// Pseudo HAL for UART - definitions elsewhere | |
void UART_SendString(char *str); | |
void UART_ReceiveInterruptEnable(void); | |
void UART_ReceiveInterruptDisable(void); |
This file contains hidden or 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
# Monty Hall Problem Simulation | |
# Author: Ryan Sturmer | |
# | |
import random | |
def play_round(doors, switch): | |
# Choose the location of the car | |
car = random.randint(1, doors) |
This file contains hidden or 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 | |
TMPDIR=.tmp | |
DEVICE=/dev/mmcblk1 | |
CURDIR=`pwd` | |
PARTITION=$DEVICE"p1" | |
PACKAGES="\ | |
base-devel git vim \ | |
nodejs npm \ | |
jupyter jupyter-notebook jupyterlab python2-ipykernel python-numpy python-scipy python-pandas python-requests \ |
This file contains hidden or 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
{ | |
"records": [ | |
{ | |
"t": 0, | |
"ch": "C", | |
"dir": "out", | |
"data": "\u0004" | |
}, | |
{ | |
"t": 1, |
This file contains hidden or 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
systemctl stop fabmo fabmo-updater | |
cd /fabmo | |
mount -w -o remount / | |
rm -rf engine updater | |
git clone https://github.com/FabMo/FabMo-Engine.git ./engine | |
git clone https://github.com/FabMo/FabMo-Updater.git ./updater | |
cd /fabmo/updater | |
npm install | |
touch install_token |
This file contains hidden or 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
from math import cos, sin, tan, atan2, atan, pi | |
def gx(n, x=None,y=None,z=None, f=None): | |
retval = ['G%d' % n] | |
for a,b in zip(('X','Y','Z','F'), (x, y, z, f)): | |
if b is not None: | |
if a == 'F': | |
b *= 60.0 # Feedrates in ipm not ips | |
retval.append(' %s%0.4f' % (a,b)) | |
return ''.join(retval) |
This file contains hidden or 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 xml.etree.ElementTree as ET | |
import sys | |
import math | |
import re | |
import argparse | |
import os | |
def gx(n, x=None,y=None,z=None, f=None): | |
retval = ['G%d' % n] | |
for a,b in zip(('X','Y','Z','F'), (x, y, z, f)): |
This file contains hidden or 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
function getParameterDefinitions() { | |
return [ | |
{ name: 'detents', type: 'int', initial: 12, caption: "Detents" }, | |
{ name: 'holeDiameter', type: 'float', initial: 0.25, caption: "Bolt Diameter" } | |
]; | |
} | |
function main(params) { | |
var holeDiameter = params.holeDiameter; | |
var detents = params.detents; |
NewerOlder