Hi folks - you may moan in pain now - here is a n00b!
I sit in a rather large company and build test panels, based on the Raspberry Pi. All programming is done in Python 2.
Someone suggested to me that i use the K8056 relay board instead of… well, something a bit more expensive!
I just can’t talk to the damn thing. I use code like this:
#!/usr/bin/env/python
import serial
# --- Open serial port---
ser = serial.Serial ('/dev/ttyUSB0', 2400, timeout = 0.5) #Default is 8N1, no need to specify
# --- Send stuff to K8056 ---
ser.write('whatever_i _want_to_send_to_K8056\r')
# --- Close port again ---
ser.close()
Has anyone tried this before? How do i make the board identify itself (code ‘D’) and how do i talk to the board afterwards, please? So far, no success…
Thank you for your very speedy reply. Unfortunately it does not help me any further.
I can not install MS Win .exe files on a linux box in any meaningful way.
Even if i could, i have never learned Visual Basic, and as MS seems to have abandoned all their .net stuff, any such efforts seem rather futile. Apart from the fact that i lack time, and probably never ever will get near any MS products again.
Apart from those little unfortunate hitches, it was a very good suggestion…
The protocol seems quite useful, but there is a few open ends, e.g. is the CHR$(13) a character from the MS character set, a standard ASCII character or … something completely different?
No matter what i try: no response.
Have nobody tried to run this device from a Linux box? Perhaps trough some C or C++ code or similar? Please?