I am Linux user and I have those devices:
USB-I2C convertor:
https://www.robot-electronics.co.uk/htm/usb_i2c_tech.htm
GY-30 I2C module:
https://5.imimg.com/data5/TY/AK/MY-1833510/gy-30-bh1750-intensity-digital-light-sensor-module.pdf
And GY-30 is with BH1750 Ambient light sensor:
https://www.mylms.cz/wp-content/uploads/2017/07/bh1750-datasheet.pdf
I need to read Luxs from BH1750 over virtual serial port in Python3, but I am not sure how to do it. I ended with something like this:
import serial
ser = serial.Serial(port="/dev/ttyUSB0",
baudrate=19200,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_TWO,
bytesize=serial.EIGHTBITS,
timeout=0.500,
)
ser.flushInput()
ser.flushOutput()
ser.write(bytearray([0x55, 0x23, 0x11, 0x01]))
test = ser.read()
But I am not sure, what are the right bytes. I have the GY-30 connected directly to USB-I2C.
Thank for your eventual help ...
Jiri