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@7:d9aca501126f, 2012-04-02 (annotated)
- Committer:
- Yo_Robot
- Date:
- Mon Apr 02 19:47:49 2012 +0000
- Revision:
- 7:d9aca501126f
- Parent:
- 6:b4dae934e1ea
- Child:
- 8:958dfe5052b9
v0.2 Serial no RPC. PTO funciona bien, Aout falta revisar.
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 | 7:d9aca501126f | 8 | DigitalOut pin_son( p30 ); // SON |
Yo_Robot | 7:d9aca501126f | 9 | DigitalOut pin_dir( p29 ); // SIGN+ |
Yo_Robot | 7:d9aca501126f | 10 | InterruptIn pin_alm( p14 ); // ALM |
Yo_Robot | 7:d9aca501126f | 11 | AnalogOut aout( p18 ); // 0.0 a 1.0 float |
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 | 7:d9aca501126f | 17 | pin_alm.rise( &ISR_Alarm ); |
Yo_Robot | 3:8d5a9e3cd680 | 18 | |
Yo_Robot | 6:b4dae934e1ea | 19 | pin_son = 0; //Inicia apagado |
Yo_Robot | 6:b4dae934e1ea | 20 | aout = 0.5; //Salida en la Mitad. |
Yo_Robot | 4:552beeda4722 | 21 | |
Yo_Robot | 3:8d5a9e3cd680 | 22 | while(1) { |
Yo_Robot | 6:b4dae934e1ea | 23 | |
Yo_Robot | 3:8d5a9e3cd680 | 24 | |
Yo_Robot | 3:8d5a9e3cd680 | 25 | } |
Yo_Robot | 6:b4dae934e1ea | 26 | } |