Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed-rtos mbed C12832
main.cpp
- Committer:
- LuisFernandoTuzo
- Date:
- 2017-10-31
- Revision:
- 0:2124db616035
- Child:
- 1:6f592335f935
File content as of revision 0:2124db616035:
/*#include "mbed.h"
AnalogOut Aout(p18);
int *lugar;
int main() { //Inicializa los hilos de "pulso" y "calculo"; además, tras cada flanco de subida detectado, envía a la interrupción "cuenta"
//thread.start(triangular);
while(1)
{
Aout=0.5;
wait(.050);
Aout=0;
wait(.050);
}
}*/
#include "mbed.h"
Timer t;
int array[5];
int H[5];
AnalogOut Aout(p18);
int main () {
t.start();
while (1) {
while (t.read() < 0.5) {
for (int i = 0; i<5; i++) {
array[i] = i;
H[i] = array[i]*2;
Aout = array[i]/2;
wait(0.1);
}
}
t.reset();
}
}