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 board | |
import busio | |
import microcontroller as m | |
import time | |
from analogio import AnalogIn | |
from digitalio import DigitalInOut, Direction, Pull | |
import adafruit_imageload | |
import adafruit_bme680 | |
import adafruit_lsm9ds1 |
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
function myFunction() { | |
var sheeturl = "https://docs.google.com/spreadsheets/d/11_gwfesnphiI6uy4HmnCNpzL-pX1572SPKDiiiROnKs/edit"; | |
var ss = SpreadsheetApp.openByUrl(sheeturl); | |
var deck = SlidesApp.getActivePresentation(); | |
var sheet = ss.getSheetByName("test"); | |
var values = sheet.getRange('A2:B18').getValues(); | |
var slides = deck.getSlides(); | |
var template = slides[0]; | |
values.forEach(function(page) { |
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 sys | |
import time | |
import math | |
sys.path.append("./Scripts") | |
GUI_Module=__import__('Device_GUI') | |
def FWR_read(input_mask, frequency=32, delay=0.5): | |
set_frequency(frequency) | |
GUI.write_register("AFE4300", "IQ_MODE_ENABLE", 0x00) #Select FWR Mode | |
GUI.write_register("AFE4300", "ADC_CONTROL_REGISTER2", 0x63) #ADCREF to VREF / ADC connected to BCM |
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 usb.core | |
import usb.util | |
import sys | |
from commands import getstatusoutput | |
import json | |
# find our device | |
dev = usb.core.find(idVendor=0x045b, idProduct=0x0212) | |
# was it found? | |
if dev is None: |
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
syntax on | |
call plug#begin('~/.local/share/nvim/plugged') | |
" Think of sensible.vim as one step above 'nocompatible' mode: a | |
" universal set of defaults that (hopefully) everyone can agree on. | |
Plug 'tpope/vim-sensible' | |
" Far.vim makes it easier to find and replace text through multiple files. | |
" It's inspired by fancy IDEs, like IntelliJ and Eclipse, that provide cozy | |
" tools for such tasks. | |
Plug 'brooth/far.vim' |
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 <Wicked_DCMotor.h> | |
int num_motors = 5; | |
Wicked_DCMotor motor1(M1); | |
Wicked_DCMotor motor2(M2); | |
Wicked_DCMotor motor3(M3); | |
Wicked_DCMotor motor4(M4); | |
Wicked_DCMotor motor5(M5); | |
Wicked_DCMotor *m[] = {&motor1, &motor2, &motor3, &motor4, &motor5}; |
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
''' | |
MioDecode.py | |
Reads data from the internal serial bus of a Mio Alpha and prints the BPM to screen. | |
Dependences: | |
-pyserial | |
Usage: | |
python.exe MioDecode.py --port='<serial port>' --baud=<baud rate> |
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 json | |
f = open('devinfo.json','r') | |
lines = f.readlines() | |
config = json.loads(lines[0]) | |
print config['data_format'] | |
print config['sensor_settings']['accelerometer']['scale'] |
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
{ | |
"gitref": "refs/heads/add_sd", | |
"gitsha": "5b5fba031cee12ffc9fa97977692062310f86ea7", | |
"devid": "533231003153344c3330373038343038", | |
"board": 201, | |
"tick_rate_hz": 1000, | |
"data_format": "0.1", | |
"sample_ticks": { | |
"accelerometer": 10, | |
"gyroscope": 33, |
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 pylab as plt | |
import numpy as np | |
import pandas as pd | |
import random | |
import time | |
start = time.time() | |
frames = pd.DataFrame([0], [0.0], ['data']) | |
plt.ion() |
NewerOlder