Realizamos una PCB para integrar los driver de los motores y el circuito de la matriz 8x8, trabajando ademas el núcleo STM32 f446re

Dependencies:   MAX7219 mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers vision.h Source File

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 DigitalOut _A4(PB_8); // pines motor paso a paso
00010 DigitalOut _A5(PB_9);
00011 DigitalOut _A6(PA_5);
00012 DigitalOut _A7(PA_6);
00013 
00014 
00015 PwmOut mipwm(PA_0); // pin servomotor1
00016 PwmOut mipwm2(PA_1);// pin servomotor2
00017 PwmOut mipwm3(PB_0);// pin servomotor3
00018 
00019 Serial command(USBTX, USBRX); // definicion serial
00020 
00021 Max7219 pantalla(PB_15, PB_14, PB_13, PB_12); //pines matriz
00022 
00023 
00024 DigitalOut led(LED1); // pin led1
00025 
00026 
00027 
00028 
00029 void stepper(uint8_t num_steps, uint8_t direction); // funcion que define el numero de pasos
00030 void clockwise() ; // funcion para giro en sentido horario
00031 
00032 void anticlockwise();  // funcion para giro en sentido antihorario
00033 void Print_pantalla_tabla(unsigned char *pValor); //funcion imprimir imagen en la matriz
00034 
00035 unsigned char clear[]= {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}; // limpiar matriz
00036 unsigned char m1up[]= {0x00,0x04,0x06,0x27,0xf7,0x06,0x04,0x00};  //secuencia 1
00037 unsigned char m1left[]= {0x04,0x0e,0x1f,0x00,0x00,0x20,0xf0,0x00};  //secuencia 2
00038 unsigned char m1right[]= {0x00,0x20,0xf0,0x00,0x00,0x1f,0x0e,0x04};  //secuencia 3
00039 unsigned char m2up[]= {0x00,0x04,0x06,0xf7,0x07,0xf6,0x04,0x00};  //secuencia 4
00040 unsigned char m2left[]= {0x04,0x0e,0x1f,0x00,0xf0,0x00,0xf0,0x00};  //secuencia 5
00041 unsigned char m2right[]= {0x00,0xf0,0x00,0xf0,0x00,0x1f,0x0e,0x04};  //secuencia 6
00042 unsigned char m3up[]= {0x00,0x04,0xf6,0x07,0xf7,0x06,0xf4,0x00};  //secuencia 7
00043 unsigned char m3left[]= {0x04,0x0e,0x1f,0xf0,0x00,0xf0,0x00,0xf0};  //secuencia 8
00044 unsigned char m3right[]= {0xf0,0x00,0xf0,0x00,0xf0,0x1f,0x0e,0x04};  //secuencia 9
00045 unsigned char m4up[]= {0x00,0x04,0x06,0x77,0x47,0xf6,0x04,0x00};  //secuencia 10
00046 unsigned char m4left[]= {0x04,0x0e,0x1f,0x00,0x70,0x40,0xf0,0x00};  //secuencia 11
00047 unsigned char m4right[]= {0x00,0x70,0x40,0xf0,0x00,0x1f,0x0e,0x04};  //secuencia 12
00048 
00049