Optical Feedback Linear Actuator


Im a college student in mechanical engineering.
For my project, i need to use three linear actuators with optical feedback mechanism.

I searched the Google for a code, but I couldn't find.

The code im looking for is, a positional control code that can help us to understand the position of the linear actuator with the help of optical sensor.

Can you help me with the code? Im not familiar with C++ or other programming languages.
I need the code so much.

Thank you

I guess you could use something like a VL53L0X sensor to determine the position of the actuator. feasability would greatly depend on your setup and whether it can be sensibly located of the task.

May I ask why it need to be optical? why not a typical encoder (which your linear actuator may already be fitted with)

can it be that you are using a translator and the “optical sensor” you are talking about is actually an “optical encoder”? about every linear actuator I came across had either an analog feedback or an encoder.

I'd consider writing this code for you on condition you swear to never be involved with designing a building that I am in, a vehicle sharing the road with me, or a bridge I cross or pass beneath.

Have you considered actually learning the stuff that your degree notionally requires you to know?