Python Forum
Show real time temperature and storage with Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Show real time temperature and storage with Python
#1
import serial
import matplotlib.pyplot as plt
from drawnow import *

values = []
plt.ion()
cnt=0

serialArduino = serial.Serial('COM3', 115200)

def plotValues():
    plt.title('Serial value from Arduino')
    plt.grid(True)
    plt.ylabel('Values')
    plt.plot(values, 'rx-', label='values')
    plt.legend(loc='upper right')

#pre-load dummy data

    
while True:
    while (serialArduino.inWaiting()==0):
        pass
    valueRead = serialArduino.readline()
    print(valueRead)
I'm getting the temperatures like this:
---------------------------------------
b'27.39 , 27.22\r\n'
b'27.35 , 27.27\r\n'
b'27.44 , 27.33\r\n'
b'27.41 , 27.37\r\n'
b'27.39 , 27.33\r\n'
-------------------------------------------------
How I can fix this error and get clean result, and also how I can graph in real time and storage the data?

Thank you so much for the help.
Reply


Messages In This Thread
Show real time temperature and storage with Python - by linkxxx - Aug-28-2019, 10:45 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  uploading files from a ubuntu local directory to Minio storage container dchilambo 0 474 Dec-22-2023, 07:17 AM
Last Post: dchilambo
  Upload Files to Azure Storage Container phillyfa 6 718 Dec-22-2023, 06:11 AM
Last Post: Pedroski55
  Non-blocking real-time plotting slow_rider 5 3,672 Jan-07-2023, 09:47 PM
Last Post: woooee
  Multiple.ui windows showing at the same time when I only want to show at a time eyavuz21 4 1,053 Dec-20-2022, 05:14 AM
Last Post: deanhystad
  Help gathering Temperature from API response road102 5 1,086 Dec-16-2022, 08:30 PM
Last Post: road102
  PIL Image im.show() no show! Pedroski55 2 978 Sep-12-2022, 10:19 PM
Last Post: Pedroski55
  How to change UTC time to local time in Python DataFrame? SamKnight 2 1,619 Jul-28-2022, 08:23 AM
Last Post: Pedroski55
  python basemap, cant show the right coordinates dbsr 0 972 Jun-08-2022, 01:55 PM
Last Post: dbsr
  Real time database satyanarayana 3 1,676 Feb-16-2022, 01:37 PM
Last Post: buran
  Real time data satyanarayana 3 24,622 Feb-16-2022, 07:46 AM
Last Post: satyanarayana

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020