el programa permite ingresar la posición en el eje X,Y,Z, haciendo que el Servo MG90S con sus movimientos de 180° trabaje en mm de 0 a 50.
Dependents: PICCOLO_CNC PICCOLO_CNC1
Servo_X.h
- Committer:
- Stevenor1997
- Date:
- 2018-03-08
- Revision:
- 4:4b884116fbe6
- Parent:
- 2:cc30b42ac66f
- Child:
- 5:c91bd4adb88b
File content as of revision 4:4b884116fbe6:
#include "mbed.h" #ifndef SERVO_X_H #define SERVO_X_H #define MINPULSE 560 #define MAXPULSE 2400 #define MAXPOS 50// poscisión max de la coordenasda en mm #define DRAW 50 #define NODRAW 0 #define CM_EJECUTAR 0Xff #define CM_GUARDAR 0Xfe #define CM_SERVO 0Xfd #define CM_SDRAW 0xfc #define CM_SN0DRAW 0xfb #define CM_STOP 0xfa #define CM_END 0xf0 class Servo { private: uint8_t x,y,z; int mm2pulse(float vmm); public: Servo(); ~Servo(); void SetServo(uint8_t,uint8_t); void SetZ(uint8_t); uint8_t GetServoX(); uint8_t GetServoY(); uint8_t GetServoZ(); int CONVERTIDOR(int); }; #endif