Javier Vicente
/
PantillaProyectoSmartMeter
Pantilla proyecto
Diff: main.cpp
- Revision:
- 2:f50bb191b326
- Parent:
- 1:fa4a5417c176
diff -r fa4a5417c176 -r f50bb191b326 main.cpp --- a/main.cpp Mon Dec 17 23:06:03 2018 +0000 +++ b/main.cpp Mon Dec 17 23:09:04 2018 +0000 @@ -12,7 +12,7 @@ int flag=0; AnalogIn tension(A0); AnalogIn intensidad(A1); - +InterruptIn boton(USER_BUTTON); struct Vectores{ float vTensionA[muestras]; @@ -28,17 +28,21 @@ void visualizacion() { - float datoTension=tension.read(); + //sacar el dato selecionado por la pantalla } - +void cambiar() +{ + //incrementar el contador de dato a mostrar +} int eBoton=0; void captura() { //leer las senales analogicas y meterlas en el buffer adecuado - + float datoTension=tension.read(); + if(bufferActivo) { } else { @@ -56,6 +60,7 @@ Ticker timerVisualizacion; timerCaptura.attach_us(&captura,200); timerVisualizacion.attach(&visualizacion,1.0); + boton.rise(&cambiar); while(1) { if(flag) { //Pocesar buffer