mirror of
https://github.com/usatiuk/EggbotWireless.git
synced 2025-10-26 16:57:48 +01:00
use atmega32 to control stepper motors
Signed-off-by: Stepan Usatyuk <usaatyuk@ustk.me>
This commit is contained in:
22
Firmware/MotorControl/include/Pen.h
Normal file
22
Firmware/MotorControl/include/Pen.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#include <Servo.h>
|
||||
|
||||
#ifndef PEN_H
|
||||
#define PEN_H
|
||||
|
||||
class Pen {
|
||||
private:
|
||||
int posEngaged;
|
||||
int posDisengaged;
|
||||
bool engaged = true;
|
||||
Servo servo;
|
||||
|
||||
public:
|
||||
Pen(int pin, int posEngaged, int posDisengaged);
|
||||
void engage();
|
||||
void disengage();
|
||||
void init();
|
||||
bool getEngaged();
|
||||
~Pen();
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user