Skip to content

TypeError: ord() expected a character, but string of length 0 found #5

@MohitM-CIS

Description

@MohitM-CIS
#import the pyserial module
import serial
import socket
import ncd_industrial_relay as ncd
#set up your serial port with the desire COM port and baudrate.
serial_port = serial.Serial(port='COM11', baudrate=115200, bytesize=serial.EIGHTBITS, stopbits=serial.STOPBITS_ONE, timeout=.5)
#instantiate the board object and pass it the serial port
board1 = ncd.Relay_Controller(serial_port)
board1.turn_on_relay_by_index(1)
board1.get_relay_status_by_index(1)
#board1.turn_off_relay_by_index(1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions