final nnnn
Este proyecto es un Piccolo en el cual se envía comandos para la realización de un dibujo en especifico. El programa va a controlar servos y motores paso a paso teniendo libertad de movimiento en los ejes X,Y,Z; En el programa se utiliza Comunicacion Serial (TX,RX) y para leer el dato fue necesario concatenarlo debido a que recibe 8 Bits pero tenemos que recibir 4 paquetes de 8 Bits para llegar a 32 Bits y poder asi leerlo.
Se estan implementando algunas librerias para su ejecucion como la #include "memory.h" que es de memoria, #include memory_array_h, tambien definimos la memoria #define mm_size 10 de tipo Type Uint32_t, la libreria de operaciones #include "math.h" y la libreria para los motores #include "stepmotor.h".
Para su ejecucion se crearon variables de ejecucion:
CM_DRAWING 0XFF: Se ejecuta siempre y cuando exista datos validos para leer de memoria y nos muestra por medio de un mensaje que se esta ejecutando el dibujo
CM_SAVING 0XFE: Inicia el comando de guardar
CM_VERTEX2D 0XFD: Se encarga de dar las coordenadas a los servomotores en X,Y.
CM_DRAW 0XFC: Se encarga de mover nuestro motor en Z
CM_NODRAW 0XFB: Su funcion es volver a la posicion inicial el motor en el eje Z
CM_MOTOR 0XF9: Se encarga de mover los motores paso a paso para llegar a la ubicacion asignada ingresando el Numero de cuadrantes y su sentido de giro.
memory.h@2:14fcd29abee0, 2018-04-26 (annotated)
- Committer:
- ANTONIO_VARGAS
- Date:
- Thu Apr 26 01:48:40 2018 +0000
- Revision:
- 2:14fcd29abee0
- Parent:
- 1:6ed951d975cc
explicacion programa piccolo
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ANTONIO_VARGAS | 0:0119b611fc51 | 1 | #ifndef MEMORY_ARRAY_H |
ANTONIO_VARGAS | 0:0119b611fc51 | 2 | #define MEMORY_ARRAY_H |
ANTONIO_VARGAS | 0:0119b611fc51 | 3 | |
ANTONIO_VARGAS | 0:0119b611fc51 | 4 | #include "mbed.h" |
ANTONIO_VARGAS | 0:0119b611fc51 | 5 | |
ANTONIO_VARGAS | 0:0119b611fc51 | 6 | #define MEM_SIZE 10 |
ANTONIO_VARGAS | 0:0119b611fc51 | 7 | #define MEM_TYPE uint32_t |
ANTONIO_VARGAS | 0:0119b611fc51 | 8 | |
ANTONIO_VARGAS | 0:0119b611fc51 | 9 | |
ANTONIO_VARGAS | 0:0119b611fc51 | 10 | |
ANTONIO_VARGAS | 0:0119b611fc51 | 11 | void tail_reset(); |
ANTONIO_VARGAS | 0:0119b611fc51 | 12 | void mem_free(); |
ANTONIO_VARGAS | 0:0119b611fc51 | 13 | uint8_t mem_put(MEM_TYPE data); |
ANTONIO_VARGAS | 0:0119b611fc51 | 14 | uint8_t mem_get(MEM_TYPE* data); |
ANTONIO_VARGAS | 0:0119b611fc51 | 15 | |
ANTONIO_VARGAS | 0:0119b611fc51 | 16 | |
ANTONIO_VARGAS | 0:0119b611fc51 | 17 | |
ANTONIO_VARGAS | 1:6ed951d975cc | 18 | #endif |