guitastro_simple_examples.rst
1.3 KB
Guitastro Device DeltaTau simple examples
To execute the simple tests, first open a Python console and import guitastro and guitastro_device_deltatau:
For Linux:
cd ~/Documents/guitastro_device_deltatau/src
python3
>>> import guitastro
>>> import guitastro_device_deltatau
For Windows (using powershell):
cd C:\Users\xxx\Documents\guitastro_device_deltatau\src
python
>>> import guitastro
>>> import guitastro_device_deltatau
1. List Components of a device
>>> dev = guitastro_device_deltatau.Device_Deltatau("TCA")
>>> print("Components are:")
>>> for key, val in dev.components().items():
>>> print(f" * {key} of type {val[0]}")
2. Open the connection and send commands
>>> dev = guitastro_device_deltatau.Device_Deltatau("TCA")
>>> dev.open(False)
>>> dev.commandstring("mount SET target 'RADEC 12h56m -10d23m'")
>>> dev.commandstring("mount DO RADEC_GOTO")
>>> res = dev.commandstring("mount GET motion")
>>> res = dev.commandstring("focuser GET motion")