Skip to content

Graphical scope from serial or socket data using python

Notifications You must be signed in to change notification settings

arnaudhe/python-scope

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-scope

Graphical scope from serial or socket data using python. The settings are based on a json file.

Dependencies

  • numpy
  • json
  • pyserial
  • pygame

pip install -r requirements.txt

Usage (script)

python scope.py <conf_file_json>

Usage (package)

import pygame
from scope.scope import Oscilloscope, DataReaderUdp

UDP_PORT = 8000
CHANNELS = 4
WIDTH = 1280
HEIGHT = 1080
DEPTH = 200
MIN = -10.0
MAX = 10.0

pygame.init()
reader = DataReaderUdp(UDP_PORT, CHANNELS, r"(.+)", DEPTH)
scope = Oscilloscope(reader, CHANNELS, WIDTH, HEIGHT, DEPTH, MIN, MAX, ["channel 1", "channel 2", "channel 3", "channel 4"])

Test

python scope.py test/udp_triangle.py python scope.py test/conf_udp_triangle.json

About

Graphical scope from serial or socket data using python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published