Skip to content

Instantly share code, notes, and snippets.

View gsvster's full-sized avatar

Svyatoslav gsvster

  • Ukraine, Ternopil'
View GitHub Profile
@gsvster
gsvster / rotary.c
Last active September 17, 2021 16:35
Control a Stepper Motor using Arduino and Rotary Encoder
#include <Stepper.h>
/*-----( Declare Constants, Pin Numbers )-----*/
int in1 = 2;
int in2 = 3;
int in3 = 4;
int in4 = 5;
// init rotary encoder
int pinA = 7;
<style type="text/css">
.dps_poll_content{{ poll.pk }} {/*background-color: #0B9D0B; padding: 3px;*/}
.dps_poll_content_header {font-variant: small-caps;}
.dps_poll_userspace {float: left; width: 100%; text-align: right;}
.dps_poll_title {color: #b10000; font-variant: small-caps; text-decoration: underline;}
.dps_poll_warning_message {color: #f88885;}
.dps_poll_body {
/*
background-color: #c1e0f1;