Python Forum
Retrieve data from oscilloscope using pyserial on ubuntu
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Retrieve data from oscilloscope using pyserial on ubuntu
#1
Hi i am trying to retrieve data from an oscilloscope, it works well with windows using the provided software but i need to use it with ubuntu using the raw data directly. For the moment i came up with:
import serial
from serial import Serial

ser = serial.Serial('/dev/ttyACM0',115200, timeout=0)
print ser.name

packet = bytearray()
packet.append(<byte1>)
packet.append(<byte2>)
packet.append(<byte3>)
packet.append(<byte4>)

ser.write(packet)
print packet 
while ser.in_waiting:
	data=ser.read()
	print data
	print '\n'	
ser.close()
but the while loop is not performed, and also how to set parameters like ReadIntervalTimeout, ReadTotalTimeoutMultiplier specific to win32 serial or is there a more suitable library than pyserial. I am sure about the <bytei> values, i figured them using a serial port sniffer.

Best regards.
Reply


Messages In This Thread
Retrieve data from oscilloscope using pyserial on ubuntu - by jte350 - Apr-27-2021, 10:10 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is it possible to capture live running waveforms in an oscilloscope using python? Girishbabu_27 4 1,135 Jul-29-2023, 06:05 AM
Last Post: Girishbabu_27
  Code to retrieve data from a website charlie13255 0 1,044 Jul-07-2022, 07:53 PM
Last Post: charlie13255
  Retrieve data from MongoDB dsuk 2 2,417 Aug-24-2020, 09:22 PM
Last Post: micseydel
  Regex to retrieve data from json in script tag. DreamingInsanity 4 9,742 Dec-20-2019, 06:18 PM
Last Post: DreamingInsanity
  Retrieve data from Terminal output or from an ASE variable. DreamingInsanity 0 2,271 Jul-08-2018, 05:51 PM
Last Post: DreamingInsanity
  Receiving large data stream using Pyserial trampas 1 4,320 Mar-09-2017, 03:32 AM
Last Post: Analyser

Forum Jump:

User Panel Messages

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