Skip to content

Instantly share code, notes, and snippets.

View L-four's full-sized avatar

Kyah Rindlisbacher L-four

View GitHub Profile
@L-four
L-four / LICENSE.txt
Created May 24, 2011 08:36 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
/*
Rotates through 480 steps every time the button is pressed.
Check your equipment to find out how many motor steps it takes for a full rotation. In my case it's 4800.
4800/sides or gear teeth you need to cut = number to put into "const int pulseset"
*/
int count = 0;
const int pulseset = 480; //change this to change how many sides/gear teeth. 4800 pulses per rotation on my spindexer.
const int directionPin = 8;
const int pulsePin = 9; // the stepper driver gives one step at the rising edge of the pulse from the Arduino.
const int sensorValue = 1000; // sets the speed of rotation. 1000 is slow, 10 is fast