Skip to content

Instantly share code, notes, and snippets.

View jrsphoto's full-sized avatar

John Scherer jrsphoto

View GitHub Profile
// -----------------------------------------------------------------------------------
// Configuration for OnStep MaxPCB (Teensy3.5/3.6)
/*
* For more information on setting OnStep up see http://www.stellarjourney.com/index.php?r=site/equipment_onstep and
* join the OnStep Groups.io at https://groups.io/g/onstep
*
* See the Pins.MaxPCB.h file for detailed information on this pin map to be sure it matches your wiring *** USE AT YOUR OWN RISK ***
*
*/
@jrsphoto
jrsphoto / new_829.conf
Created September 28, 2019 22:43
updated ir829 config
Current configuration : 2815 bytes
!
! Last configuration change at 23:17:32 UTC Sat Sep 28 2019
!
version 15.6
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service internal
@jrsphoto
jrsphoto / ir829.conf
Created September 28, 2019 19:50
Cisco IR829 run-config
Current configuration : 2657 bytes
!
version 15.6
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service internal
service unsupported-transceiver
!
hostname IR800
@jrsphoto
jrsphoto / read_enc.txt
Created September 20, 2019 22:28
modified function to read encoders with teensy 3.6
int enc_read( void ) {
int result = 0;
byte newState;
int enc_speed = 0;
unsigned long previousMillis = millis();
unsigned long stop_by = 50;
unsigned long currentMillis = millis();
while ((currentMillis - previousMillis) < stop_by) { // check if the previous state was stable
// see http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1267553811/0
// and http://code.google.com/p/digitalwritefast/
// It turns out that the regular digitalRead() calls are too slow and bring the arduino down when
// I use them in the interrupt routines while the motor runs at full speed creating more than
// 40000 encoder ticks per second per motor.
// Tuning encoder
#define c_EncoderAInterrupt 18
#define c_EncoderPinA 18
@jrsphoto
jrsphoto / extruder calibration.g
Last active June 5, 2019 07:52
[Extruder Calibration] gcode to calibrate 3d printer extruder #ender3 #3dprinting
; 0:/macros/Calibration/E Steps Calibration.g
; Macro to calibrate the extruder steps per mm by extruding 110mm of filament slowly and comparing expected result with actual result.
M291 S3 R"Proceed?" P"Run E Steps per MM Calibration?"
M117 "Homing"
G28 ; Home All Axis
G0 Z50 X122 Y122
T0 ; Activate Tool0
G10 P0 S220 R0 ; Hot end to 220c
M291 S3 R"Heating to 220" P"Mark 110mm on filament from top of extruder body."