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
// 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: |
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
/** | |
* 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 |