is there any way i can join this graphics in Python? Because BITalino sensor(data) only get a 100 samples in the graphics, so if i put 2 seconds of aquisition he wil generate something between 10 or 15 graphics, there is a way i can join this graphics and obtain something near a real-time aquisition.enter image description here
There is how to change da sample, but if i put 2000 for example, is not exactly a real time acquisition.
I generate the graphics, the ideia is to make a supervisory of 2 sensors in real time or something like this.
My code look like this:
`SamplingRate=1000 # taxa de amostragem de 1000Hz
device.battery(0)
device.start(SamplingRate, [4])# Sensor 4(A5)
sinal_analógico = [0, 1023]
faixa_tensão = [-1.65, 1.65] # tensão em milivolts
variação = faixa_tensão[1] - faixa_tensão[0] # 1,65 -(-1,65) = 3,3mV
botão_start = input ("Aperte a Tecla para Inciar a Aquisição: ")
running_time = input("Escolha o tempo de aquisição: ")
start = time.time()
end = time.time()
if botão_start == "s":
print("Aquisição Inciada \n")
while (end - start) < int(running_time):
# Read samples
data = device.read(100) # Leitura do sensor
print(data)
plt.plot(data[:,5], 'blue', label = 'Sinal A5') # 5 = coluna 5
plt.title("Sinal ACC")
plt.xlabel("amostras")
plt.ylabel("bits")
plt.show()
end = time.time()
# Script sleeps for n seconds
time.sleep(int(running_time))
device.stop()
device.close()
else :
device.stop()
device.close()
`