Apr-12-2017, 09:15 AM
Hello, I expose my problem: I want to acquire a signal various frequency (alternating sinusoidal 0.2mV alternative with the help of a program in python.) I need a sampling frequency 8 times greater. I'm am on a pcduino card.
For 1Hz the signal is correct, but for 20Hz is doesnt work.
I think is a sample problem.
Have you have idea, or solution.
Thanks
For 1Hz the signal is correct, but for 20Hz is doesnt work.
I think is a sample problem.
Have you have idea, or solution.
Thanks

#!/usr/bin/python # -*- coding: utf-8 -*- from pyduino import * # import fonctions Arduino import numpy as np import time #measurement time temps=10 #second end=time.time()+temps f=open("/home/ubuntu/data/text/TensionsA2.txt","w") # open file start=time.time() while time.time()<end: start=time.time() mesure=analogRead(A2) #read analog value tension=mesure*3.3/4095.0 #conversion print("tension",str(tension)) out=str(tension) f.write(out+"\n") elapsed=(time.time()-debut) print("Time to run",elapsed+0.00625) pass # wait 10s f.close()