![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
servo visual
Embed:
(wiki syntax)
Show/hide line numbers
vision.h
00001 00002 00003 00004 00005 DigitalOut _A0(PA_9); // pines motor paso a paso 00006 DigitalOut _A1(PC_7); 00007 DigitalOut _A2(PB_6); 00008 DigitalOut _A3(PA_7 ); 00009 00010 00011 PwmOut mipwm(PA_0); // pin servomotor1 00012 PwmOut mipwm2(PA_1);// pin servomotor2 00013 PwmOut mipwm3(PB_0);// pin servomotor3 00014 00015 Serial command(USBTX, USBRX); // definicion serial 00016 00017 Max7219 pantalla(PB_15, PB_14, PB_13, PB_12); //pines matriz 00018 00019 00020 DigitalOut led(LED1); // pin led1 00021 00022 00023 00024 00025 void stepper(uint8_t num_steps, uint8_t direction); // funcion que define el numero de pasos 00026 void clockwise() ; // funcion para giro en sentido horario 00027 00028 void anticlockwise(); // funcion para giro en sentido antihorario 00029 void Print_pantalla_tabla(unsigned char *pValor); //funcion imprimir imagen en la matriz 00030 00031 unsigned char clear[]= {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; // limpiar matriz 00032 unsigned char m1up[]= {0x00,0x04,0x06,0x27,0xf7,0x06,0x04,0x00}; //secuencia 1 00033 unsigned char m1left[]= {0x04,0x0e,0x1f,0x00,0x00,0x20,0xf0,0x00}; //secuencia 2 00034 unsigned char m1right[]= {0x00,0x20,0xf0,0x00,0x00,0x1f,0x0e,0x04}; //secuencia 3 00035 unsigned char m2up[]= {0x00,0x04,0x06,0xf7,0x07,0xf6,0x04,0x00}; //secuencia 4 00036 unsigned char m2left[]= {0x04,0x0e,0x1f,0x00,0xf0,0x00,0xf0,0x00}; //secuencia 5 00037 unsigned char m2right[]= {0x00,0xf0,0x00,0xf0,0x00,0x1f,0x0e,0x04}; //secuencia 6 00038 unsigned char m3up[]= {0x00,0x04,0xf6,0x07,0xf7,0x06,0xf4,0x00}; //secuencia 7 00039 unsigned char m3left[]= {0x04,0x0e,0x1f,0xf0,0x00,0xf0,0x00,0xf0}; //secuencia 8 00040 unsigned char m3right[]= {0xf0,0x00,0xf0,0x00,0xf0,0x1f,0x0e,0x04}; //secuencia 9 00041 unsigned char m4up[]= {0x00,0x04,0x06,0x77,0x47,0xf6,0x04,0x00}; //secuencia 10 00042 unsigned char m4left[]= {0x04,0x0e,0x1f,0x00,0x70,0x40,0xf0,0x00}; //secuencia 11 00043 unsigned char m4right[]= {0x00,0x70,0x40,0xf0,0x00,0x1f,0x0e,0x04}; //secuencia 12 00044
Generated on Sat Jul 23 2022 09:49:34 by
![doxygen](doxygen.png)