Tutorial Three: Simple Camera
This tutorial demonstrates how to create a simple Camera simulator that can generate and transmit FITS images. It builds on the concepts introduced in the previous tutorials and introduces BLOB (Binary Large Object) handling for image data.
What You’ll Learn
- How to create a Camera driver by inheriting from
INDI::CCD
- How to generate and transmit FITS images
- How to handle BLOB properties
- How to simulate CCD temperature control
Source Code
The source code for this tutorial can be found in the INDI library repository under the examples/tutorial_three
directory.
Code Explanation
This driver simulates a simple camera that can:
- Connect/disconnect to the device
- Control the TEC temperature
- Capture images with different exposure times
- Generate and transmit FITS images
The key components include:
- CCD Properties: Temperature, exposure time, and image data
- FITS Generation: Creating simulated FITS images with random data
- BLOB Handling: Transmitting binary image data to clients
Running the Tutorial
To run this tutorial:
-
Build the tutorial using CMake:
cd /path/to/indi/build make
-
Run the INDI server with the tutorial driver:
indiserver -v ./tutorial_three
-
Connect to the server using an INDI client (like KStars/EKOS or INDI Control Panel).
-
You should see the “Simple CCD” in the client, and you can connect to it, set the temperature, and take exposures.
Next Steps
This tutorial demonstrates a simple Camera simulator. In Tutorial Four, we’ll learn how to use skeleton files to define properties.