Proyecto de Tesis en Mecatrónica. Universidad Técnica del Norte. Ernesto Palacios <mecatronica.mid@gmail.com>
Dependencies: EthernetNetIf HTTPServer QEI_hw RPCInterface mbed
main.cpp@6:b4dae934e1ea, 2012-04-01 (annotated)
- Committer:
- Yo_Robot
- Date:
- Sun Apr 01 20:03:42 2012 +0000
- Revision:
- 6:b4dae934e1ea
- Parent:
- 5:c5aea1eb10bb
- Child:
- 7:d9aca501126f
v0.1 Serial No RPC. sistema base para la comunicacion con la libreria ASM
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Yo_Robot | 4:552beeda4722 | 1 | // GENERADOR DE FRECUENCIAS |
Yo_Robot | 3:8d5a9e3cd680 | 2 | |
Yo_Robot | 3:8d5a9e3cd680 | 3 | #include "mbed.h" |
Yo_Robot | 3:8d5a9e3cd680 | 4 | #include "setup.h" |
Yo_Robot | 3:8d5a9e3cd680 | 5 | |
Yo_Robot | 6:b4dae934e1ea | 6 | Serial pc( USBTX, USBRX ); |
Yo_Robot | 5:c5aea1eb10bb | 7 | |
Yo_Robot | 6:b4dae934e1ea | 8 | DigitalOut pin_son( p30 ); // SON |
Yo_Robot | 6:b4dae934e1ea | 9 | DigitalOut pin_dir( p29 ); // SIGN+ |
Yo_Robot | 6:b4dae934e1ea | 10 | DigitalIn pin_alm( p14 ); // ALM |
Yo_Robot | 6:b4dae934e1ea | 11 | AnalogOut aout( p18 ); // +-10V |
Yo_Robot | 3:8d5a9e3cd680 | 12 | |
Yo_Robot | 3:8d5a9e3cd680 | 13 | int main() { |
Yo_Robot | 6:b4dae934e1ea | 14 | |
Yo_Robot | 6:b4dae934e1ea | 15 | setTimer2(); |
Yo_Robot | 6:b4dae934e1ea | 16 | pc.attach( &ISR_Serial ); |
Yo_Robot | 3:8d5a9e3cd680 | 17 | |
Yo_Robot | 6:b4dae934e1ea | 18 | pin_son = 0; //Inicia apagado |
Yo_Robot | 6:b4dae934e1ea | 19 | aout = 0.5; //Salida en la Mitad. |
Yo_Robot | 4:552beeda4722 | 20 | |
Yo_Robot | 3:8d5a9e3cd680 | 21 | while(1) { |
Yo_Robot | 6:b4dae934e1ea | 22 | |
Yo_Robot | 3:8d5a9e3cd680 | 23 | |
Yo_Robot | 3:8d5a9e3cd680 | 24 | } |
Yo_Robot | 6:b4dae934e1ea | 25 | } |