Skip to content

Instantly share code, notes, and snippets.

View jonathanjuursema's full-sized avatar
🚀

Jonathan Juursema jonathanjuursema

🚀
View GitHub Profile
@jonathanjuursema
jonathanjuursema / StepperMotorA4988.ino
Created November 3, 2018 23:00
Arduino sketch to control a stepper motor with an A4988 driver. Specifically written to control a 2DoF turret (https://www.thingiverse.com/thing:417528), hence the rotational calculations.
// This is the number of steps per revolution for the NEMA17HR stepper motor.
const float gearRatio = 50 / 7;
const int motorStepsPerRevolution = 400;
/*
* The Stepper class abstracts one stepper motor and contains the logic the control said motor.
* This class is written for the A4988 stepper driver but might also work for others.
*/
class Stepper {
public:
@jonathanjuursema
jonathanjuursema / ns.js
Created April 12, 2016 12:40
This is a rudimentary Homey app for retrieving train schedules from the Dutch Railways, but it has never been made into an actual app.
/**
* This is a rudimentary Homey app for retrieving train schedules from the Dutch Railways, but it has never been made into an actual app.
* This gist has been created by Jonathan Juursema in Jan '15. You are free to use this code in your own project.
*/
// Requirements
var prompt = require('prompt');
var moment = require('moment-timezone');
// NS API Credentials