StepperUNO Library 1.1: Difference between revisions

From lechacal
Jump to navigation Jump to search
Line 12: Line 12:


=Function list=
=Function list=
==Keypad==
===uint8_t ReadKey();===
===bool RstReadKey();===
===bool buttonJustPressed  = false;===    //this will be true after a ReadButtons() call if triggered
===bool buttonJustReleased = false;===    //this will be true after a ReadButtons() call if triggered
===bool rstbuttonJustPressed  = false;===    //this will be true after a ReadButtons() call if triggered
===bool rstbuttonJustReleased = false;===    //this will be true after a ReadButtons() call if triggered
===bool rstbuttonLongPress    = false;===
==Motor Control==
===void speed(int speed_m1);===
===void setDirection(bool dir);===
===void enable();===
===void disable();===
===void step();===
===void stop();===
===uint8_t address;===
===void begin(uint8_t _address);===
===bool running;===
===bool direction;===


=State variables=
=State variables=

Revision as of 16:22, 23 June 2017

under construction...

Installation

Download the zip file.
Copy the StepperUNO folder in the sketchbook/library directory.


Configuration

Open the config.h file in the library/stepperUNO folder.
Change the KEYPAD_VERSION value as needed. Value should be 1 or 2. If you do not know just try one or the other and see how the button reacts.

Function list

Keypad

uint8_t ReadKey();

bool RstReadKey();

===bool buttonJustPressed = false;=== //this will be true after a ReadButtons() call if triggered ===bool buttonJustReleased = false;=== //this will be true after a ReadButtons() call if triggered ===bool rstbuttonJustPressed = false;=== //this will be true after a ReadButtons() call if triggered ===bool rstbuttonJustReleased = false;=== //this will be true after a ReadButtons() call if triggered

bool rstbuttonLongPress = false;

Motor Control

void speed(int speed_m1);

void setDirection(bool dir);

void enable();

void disable();

void step();

void stop();

uint8_t address;

void begin(uint8_t _address);

bool running;

bool direction;

State variables