fghfgh
Dependencies: mbed CMSIS_DSP_5 TextLCD
Diff: main.cpp
- Revision:
- 6:1e45b5f30b87
- Parent:
- 3:44b632ea58aa
- Child:
- 7:4dd3ef163f65
--- a/main.cpp Wed Oct 24 20:23:21 2018 +0000 +++ b/main.cpp Thu Nov 21 16:28:20 2019 +0000 @@ -1,26 +1,46 @@ #include "mbed.h" +#include "arm_math.h" +#include <Ticker.h> +#include <stdio.h> +#include <string.h> +#include <AnalogIn.h> #include "datos.h" - -Timer timer; -float resultado; -int tiempo; - -float calcularRMS(int16_t *datos, int longitud); +#include "TextLCD.h" + +float Vrms; + + +// PROGRAMA PRINCIPAL int main() { - - timer.reset(); - timer.start(); - resultado=calcularRMS(datos, 500); - timer.stop(); - printf("****El valor Vrms es %f calculado en %d us ****\n",resultado,timer.read_us()); - + + + + //1.Vrms + arm_rms_f32(datosV,500,&(Vrms)); + + printf("datos entrada\n"); + for (int n=0;n<500;n++){ + printf("%f\n",datosV[n]); + } + + printf("RMS: %f\n",Vrms); + + + } -float calcularRMS(int16_t *datos, int longitud) -{ - return 0.0; -} + + + + + + + + + + +