mirror of
				https://github.com/usatiuk/EggbotWireless.git
				synced 2025-10-27 09:17:48 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			344 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			344 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include <Servo.h>
 | |
| 
 | |
| #ifndef PEN_H
 | |
| #define PEN_H
 | |
| 
 | |
| class Pen {
 | |
|    private:
 | |
|     int posEngaged;
 | |
|     int posDisengaged;
 | |
|     int pin;
 | |
|     bool engaged = true;
 | |
|     Servo servo;
 | |
| 
 | |
|    public:
 | |
|     Pen(int pin, int posEngaged, int posDisengaged);
 | |
|     void engage();
 | |
|     void disengage();
 | |
|     void init();
 | |
|     bool getEngaged();
 | |
| };
 | |
| 
 | |
| extern Pen pen;
 | |
| 
 | |
| #endif |