×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

HAT relayboard

  • Posts: 9
  • Thank you received: 0
Hi all,
I am using a RPi 3B+ with Stellarmate and a board on top with 3 relay's. I have created a small python program to control these for my spectrograph, but was wondering if there is a Indi driver for this. I can't find in the Indi Device Manager.
Cheers Arnold
4 years 8 months ago #40740

Please Log in or Create an account to join the conversation.

Replied by Jasem Mutlaq on topic HAT relayboard

No, but you can develop an INDI driver for this. Is there a C/C++ SDK for this relay board?
4 years 8 months ago #40765

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0

Replied by Arnold de Bruin on topic HAT relayboard

Hi Jasem,
no sdk, but in python it is as simple as:
import RPi.GPIO as GPIO
GPIO.setmode((GPIO.BCM)
GPIO.setup(20,GPIO.OUT)
and then
GPIO.output(20,False) or ....,True to activate a switch at pin 20

So can't be too difficult ;-)
Point of all this is that if I run Ekos remote on my laptop I can use the switches.
Now I have to use realVNC also to use my little program on the Stellarmate....

Cheers Arnold
4 years 8 months ago #40770

Please Log in or Create an account to join the conversation.

  • Posts: 44
  • Thank you received: 10

Replied by J. Hill on topic HAT relayboard

This tutorial may help get you started if you decide to write the driver for the relays :
indilib.org/develop/developer-manual/99-driver-development.html

Also, this may be of interest:
github.com/rkaczorek/astroberry-diy

I personally use the WiringPi library with INDI drivers for GPIO control. I have recently used it to add ST4 capability to an INDI raspberry pi camera driver and it works pretty well and is easy to use.
The following user(s) said Thank You: Jasem Mutlaq
4 years 8 months ago #40812

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0

Replied by Arnold de Bruin on topic HAT relayboard

Hi cb245,

The Astroberry Board may be just what I need! Thanks

Cheers Arnold
4 years 8 months ago #40843

Please Log in or Create an account to join the conversation.

Time to create page: 0.596 seconds