Skip to content

Instantly share code, notes, and snippets.

View chris-schmitz's full-sized avatar
💯

Christopher Schmitz chris-schmitz

💯
View GitHub Profile
// ConstantSpeed.pde
// -*- mode: C++ -*-
//
// Shows how to run AccelStepper in the simplest,
// fixed speed mode with no accelerations
// Requires the Adafruit_Motorshield v2 library
// https://github.com/adafruit/Adafruit_Motor_Shield_V2_Library
// And AccelStepper with AFMotor support
// https://github.com/adafruit/AccelStepper
@chris-schmitz
chris-schmitz / receiver.ino
Created May 17, 2019 17:58
Trying to get two Trinket M0s to talk to each other
char state[10];
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.println("reading bytes");
@chris-schmitz
chris-schmitz / debugging_interrupts.ino
Created May 8, 2019 18:11
This is a break out of a larger arduino sketch that I'm using to run the plinko board project. I'm running into issues adding interrupts instead of querying the state in the loop.
// * define all of the pins
// * each of these is marked as an interruptable pin on the M0 Adalogger
#define break_beam_ZERO 14
#define break_beam_ONE 11
#define break_beam_TWO 10
#define break_beam_THREE 9
#define break_beam_FOUR 6
#define break_beam_FIVE 5
#include <Adafruit_GFX.h>
#include "Adafruit_LEDBackpack.h"
#define break_beam_ONE 11
#define break_beam_TWO 10
int breakBeamState_ONE = 0;
int breakBeamState_TWO = 0;
Adafruit_BicolorMatrix matrix = Adafruit_BicolorMatrix();
@chris-schmitz
chris-schmitz / octoprint.log
Created April 29, 2018 17:15
Octoprint.log for timeslapse freezing issue
2018-04-28 01:22:37,689 - octoprint.server - INFO - --- Log roll over detected ---------------------------------------------------
2018-04-28 01:22:37,690 - octoprint.server - INFO - OctoPrint 1.3.8
2018-04-28 01:22:37,693 - octoprint.plugin.core - INFO - 11 plugin(s) registered with the system:
| Announcement Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/announcements
| Core Wizard (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/corewizard
| CuraEngine (<= 15.04) (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/cura
| Discovery (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/discovery
| DisplayLayerProgress Plugin (1.3.2) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_DisplayLayerProgress
| Logging (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/logging
| OctoPi Support Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/o
@chris-schmitz
chris-schmitz / User Settings.json
Created November 13, 2017 22:53
My vscode user preferences
{
"editor.fontSize": 17,
"editor.lineHeight": 28,
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"editor.renderIndentGuides": true,
"window.zoomLevel": 0,
"editor.quickSuggestionsDelay": 30,
"typescript.useCodeSnippetsOnMethodSuggest": true,
"git.confirmSync": false,
@chris-schmitz
chris-schmitz / mycustomdomainname.com.conf
Last active September 13, 2017 20:18
Nginx proxy pass for a node.js server
server {
listen <my-server's-external-ip>:80;
server_name <my-custom-domain-name.whateva>;
location / {
proxy_pass http://localhost:<node-process-port>;
}
}
@chris-schmitz
chris-schmitz / launch.json
Created May 12, 2017 18:44
VSCode launch config for debugging an electron app
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug Electron",
"program": "${workspaceRoot}/electron_base/index.js",
"cwd": "${workspaceRoot}",
"stopOnEntry": false,
@chris-schmitz
chris-schmitz / json.json
Created March 5, 2017 01:51
New Snippet Snippet for vscode
{
"New Snippet": {
"prefix": "snippet",
"body": [
"\"${1}\": {",
" \"prefix\": \"${2}\",",
" \"body\": [",
" ${3}",
" ],",
" \"description\": \"${0}\"",