Tagged: puck putty
IlluminatiKeymasterAugust 14, 2020 at 3:42 pmPost count: 2
Yes, the command to get the reading in lux is “GRL”, as in “Get Reading in Lux”. Most commands start with either “S” (for setting parameters) or “G”, (for getting parameters or data).
So you would send over the serial port
GRL<CR>. The meter will respond with
grl nnn.nnn, where “nnn.nnn” is the measured light level in lux. Note that commands are not case sensitive. The Puck’s replies will always start with the command, so you know the command was accepted and that’s what it’s responding to.
Michael OkinchaSenior ModeratorAugust 18, 2020 at 9:07 pmPost count: 9
You need to use a serial terminal emulator program to communicate with the Puck. Popular choices are
PuTTY(https://www.putty.org/) for Windows, Linux, Mac or
minicom(Linux, Max). Set the terminal for 115200 baud, 8 bits, no parity, one stop bit (“8N1”).
The Puck is intended to be controlled through a programming language such as C/C++, Python, MATLAB, or Labview. They are not really meant to be controlled from the DOS command line.
Naveen KoulParticipantAugust 19, 2020 at 9:57 amPost count: 3
I tried to use minicom and putty . In putty I selected serial /dev/ttyUSB0 as that is what port i see puck is attached to.
I did set the parameters asdefined above.
My main gaol is to use python to read lux and CCT values
In python do i need to open serail port first.
but after that I have ser. read and ser.write
not sure how to use GRL commnd to read lux valaue in my code.
- You must be logged in to reply to this topic.