I got a LED stripe connected with a RasPi3. The stripe should be installed at an automated guided vehicle as the human maschine interface. I would like to program the stripe so that there are "eyes" on it (e.g. 3 LED pixel on -- 5 LED pixel off -- 3 LED pixel on), which follow automatically a person who is standing in front of it.
Actually i have the methods:
"set_eye_position(msg)" which is able to set the LED pixel on an interval from -99 (completely left) to +99 (completely right) as input parameter (msg) and
"set_eyes_to_coord(msg)" which get two input parameters: The x and y coordinates of the person who is standing next to the vehicle. My approach is to set a coordinate system in the middle of the robot (see Picture)
The reason for my question is, if there is an opportunity to calculate the exact position of the LED pixel at given input parameters (x,y)?
I'm writing with Python and I'm quite a newbee in programming, so I would really appreciate if I get some ideas how to realize my issue.
Thanks in advance
EDIT:
Assuming the approach from bendl THIS is the new setup, right? I do not really know what to do with the variables boe_left, boe_right and boe_dist. But maybe I'm just too dumb to understand it.