Skip to content

An example showing how to connect and communicate with a Radwag bargraph via RS232 using Json protocol.

Notifications You must be signed in to change notification settings

Radwag/pyRdgBargraphCommunication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyRdgBargraphCommunication

Contributors Forks Stargazers Issues

An example showing how to connect and communicate with a Radwag bargraph via RS232 using Json protocol.

Technology

Project was written in the Python.

Working description

After entering the serial port name, you can manage the bargraph via json protocol.

Commands

  • Set all red segments light on with power of light 70%
{"Content": {"Address": 255, "IsRequest": true, "Power":70, "Red": [1, 1, 1, 1, 1, 1, 1, 1, 1], "Green": [0, 0, 0, 0, 0, 0, 0, 0, 0]}, "Crc": "bf"}
  • Set all green segments light on with power of light 70%
{"Content": {"Address": 255, "IsRequest": true, "Power":70, "Red": [0, 0, 0, 0, 0, 0, 0, 0, 0], "Green": [1, 1, 1, 1, 1, 1, 1, 1, 1]}, "Crc": "bf"}
  • Set all segments light on with power of light 100%
{"Content": {"Address": 255, "IsRequest": true, "Power":100, "Red": [1, 1, 1, 1, 1, 1, 1, 1, 1], "Green": [1, 1, 1, 1, 1, 1, 1, 1, 1]}, "Crc": "bf"}
  • Set all segments light off with power of light 0%
{"Content": {"Address": 255, "IsRequest": true, "Power":0, "Red": [0, 0, 0, 0, 0, 0, 0, 0, 0], "Green": [0, 0, 0, 0, 0, 0, 0, 0, 0]}, "Crc": "bf"}

Command structure

image

  • Content - object with all settings necessary to manage bargraph device.
    • Address - Address of device (default 255)
    • IsRequest -
    • Power - power of luminous segments
    • Red - a table containing the states of individual bargraph (Red)segments
    • Green - a table containing the states of individual bargraph (Green)segments
  • Crc - 8bit CRC

Installation

  1. Clone or download this repository.
  2. Open project in JestBrains PyCharm.
  3. Build and run.

About

An example showing how to connect and communicate with a Radwag bargraph via RS232 using Json protocol.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages