Newport#
- class phobos.classes.pupil_mask.Newport(session)[source]#
Bases:
objectClass to control the Newport motor (wheel).
Warning
If the command sent to the Newport motor doesn’t work but no error is raised, ensure the Newport knows its home position by running the home_search() method first.
- __init__(session)[source]#
Initialize the Newport motor.
- Parameters:
session (serial.Serial) – Serial connection to the Newport motor.
- home_search() str[source]#
Move the motor to the home position.
- Returns:
Response from the motor after moving to home position.
- Return type:
str
- send_command(command)[source]#
Send a command to the motor and return the response.
- Parameters:
command (str) – Command to send to the motor.
- Returns:
Response from the motor.
- Return type:
str
- get() float[source]#
Get the current angular position of the motor (in degrees).
- Returns:
Current angular position (in degrees) of the motor in degrees.
- Return type:
float