proyecto Smart Meter
Revision 2:f50bb191b326, committed 2018-12-17
- Comitter:
- jvicente
- Date:
- Mon Dec 17 23:09:04 2018 +0000
- Parent:
- 1:fa4a5417c176
- Commit message:
- plantilla cambios
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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