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

Committer:
Paxtel
Date:
Fri Jun 09 18:05:53 2017 +0000
Revision:
0:8180a93bf2dc
PROYECTO FINAL PICCOLO

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Paxtel 0:8180a93bf2dc 1
Paxtel 0:8180a93bf2dc 2
Paxtel 0:8180a93bf2dc 3
Paxtel 0:8180a93bf2dc 4
Paxtel 0:8180a93bf2dc 5 DigitalOut _A0(PA_9); // pines motor paso a paso
Paxtel 0:8180a93bf2dc 6 DigitalOut _A1(PC_7);
Paxtel 0:8180a93bf2dc 7 DigitalOut _A2(PB_6);
Paxtel 0:8180a93bf2dc 8 DigitalOut _A3(PA_7 );
Paxtel 0:8180a93bf2dc 9 DigitalOut _A4(PB_8); // pines motor paso a paso
Paxtel 0:8180a93bf2dc 10 DigitalOut _A5(PB_9);
Paxtel 0:8180a93bf2dc 11 DigitalOut _A6(PA_5);
Paxtel 0:8180a93bf2dc 12 DigitalOut _A7(PA_6);
Paxtel 0:8180a93bf2dc 13
Paxtel 0:8180a93bf2dc 14
Paxtel 0:8180a93bf2dc 15 PwmOut mipwm(PA_0); // pin servomotor1
Paxtel 0:8180a93bf2dc 16 PwmOut mipwm2(PA_1);// pin servomotor2
Paxtel 0:8180a93bf2dc 17 PwmOut mipwm3(PB_0);// pin servomotor3
Paxtel 0:8180a93bf2dc 18
Paxtel 0:8180a93bf2dc 19 Serial command(USBTX, USBRX); // definicion serial
Paxtel 0:8180a93bf2dc 20
Paxtel 0:8180a93bf2dc 21 Max7219 pantalla(PB_15, PB_14, PB_13, PB_12); //pines matriz
Paxtel 0:8180a93bf2dc 22
Paxtel 0:8180a93bf2dc 23
Paxtel 0:8180a93bf2dc 24 DigitalOut led(LED1); // pin led1
Paxtel 0:8180a93bf2dc 25
Paxtel 0:8180a93bf2dc 26
Paxtel 0:8180a93bf2dc 27
Paxtel 0:8180a93bf2dc 28
Paxtel 0:8180a93bf2dc 29 void stepper(uint8_t num_steps, uint8_t direction); // funcion que define el numero de pasos
Paxtel 0:8180a93bf2dc 30 void clockwise() ; // funcion para giro en sentido horario
Paxtel 0:8180a93bf2dc 31
Paxtel 0:8180a93bf2dc 32 void anticlockwise(); // funcion para giro en sentido antihorario
Paxtel 0:8180a93bf2dc 33 void Print_pantalla_tabla(unsigned char *pValor); //funcion imprimir imagen en la matriz
Paxtel 0:8180a93bf2dc 34
Paxtel 0:8180a93bf2dc 35 unsigned char clear[]= {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}; // limpiar matriz
Paxtel 0:8180a93bf2dc 36 unsigned char m1up[]= {0x00,0x04,0x06,0x27,0xf7,0x06,0x04,0x00}; //secuencia 1
Paxtel 0:8180a93bf2dc 37 unsigned char m1left[]= {0x04,0x0e,0x1f,0x00,0x00,0x20,0xf0,0x00}; //secuencia 2
Paxtel 0:8180a93bf2dc 38 unsigned char m1right[]= {0x00,0x20,0xf0,0x00,0x00,0x1f,0x0e,0x04}; //secuencia 3
Paxtel 0:8180a93bf2dc 39 unsigned char m2up[]= {0x00,0x04,0x06,0xf7,0x07,0xf6,0x04,0x00}; //secuencia 4
Paxtel 0:8180a93bf2dc 40 unsigned char m2left[]= {0x04,0x0e,0x1f,0x00,0xf0,0x00,0xf0,0x00}; //secuencia 5
Paxtel 0:8180a93bf2dc 41 unsigned char m2right[]= {0x00,0xf0,0x00,0xf0,0x00,0x1f,0x0e,0x04}; //secuencia 6
Paxtel 0:8180a93bf2dc 42 unsigned char m3up[]= {0x00,0x04,0xf6,0x07,0xf7,0x06,0xf4,0x00}; //secuencia 7
Paxtel 0:8180a93bf2dc 43 unsigned char m3left[]= {0x04,0x0e,0x1f,0xf0,0x00,0xf0,0x00,0xf0}; //secuencia 8
Paxtel 0:8180a93bf2dc 44 unsigned char m3right[]= {0xf0,0x00,0xf0,0x00,0xf0,0x1f,0x0e,0x04}; //secuencia 9
Paxtel 0:8180a93bf2dc 45 unsigned char m4up[]= {0x00,0x04,0x06,0x77,0x47,0xf6,0x04,0x00}; //secuencia 10
Paxtel 0:8180a93bf2dc 46 unsigned char m4left[]= {0x04,0x0e,0x1f,0x00,0x70,0x40,0xf0,0x00}; //secuencia 11
Paxtel 0:8180a93bf2dc 47 unsigned char m4right[]= {0x00,0x70,0x40,0xf0,0x00,0x1f,0x0e,0x04}; //secuencia 12
Paxtel 0:8180a93bf2dc 48
Paxtel 0:8180a93bf2dc 49