Skip to content

Instantly share code, notes, and snippets.

View MatthewScholefield's full-sized avatar

Matthew D. Scholefield MatthewScholefield

View GitHub Profile
@MatthewScholefield
MatthewScholefield / PythonArduino.py
Last active February 9, 2018 06:29 — forked from jreisstudio/PythonArduino.py
Python + Arduino on/off the LED.
import serial # you need to install the pySerial :pyserial.sourceforge.net
import time
with open('RMS_EMG.txt') as f:
lines = f.read().split('\n')
arduino = serial.Serial('/dev/tty.usbserial', 9600)
for line in lines:
brightness = int(float(line.split(',')[-1]) * 255)
arduino.write(bytes(str(brightness), 'ascii'))
@MatthewScholefield
MatthewScholefield / .gitignore
Last active March 12, 2024 21:39
Include only certain file types with .gitignore
*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*.*
*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*.*
*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*.*
*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*.*
*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*.*
*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*.*
*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*.*
*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*.*
*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*.*
*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*.*
@MatthewScholefield
MatthewScholefield / main.cpp
Last active August 29, 2015 14:23
Font and imageTiles problem with libnds
#include <nds.h>
#include "font.h" //GRIT generated header
#include "image.h" //GRIT generated header
ConsoleFont font;
void setupFont()
{
const int tile_base = 1;
const int map_base = 0;