Connect 4 - Digital In

Topics about the Hardware of Revolution Pi
Post Reply
TheLaughingMan
Posts: 7
Joined: 16 Mar 2024, 22:31

Connect 4 - Digital In

Post by TheLaughingMan »

Hi everybody,

first post here.
I would greatly appreciate if someone could help me understand where I can find resources to read, addressing the preparation and usage of the digital in of a Connect 4.

In particular I would like to use the in under Linux, in a C# application.

Thanks guys!!!
Gabriele
tboehler
KUNBUS
Posts: 5
Joined: 02 May 2023, 16:22

Re: Connect 4 - Digital In

Post by tboehler »

Hello. We don't have a C# library you can use to access the digital in of a Connect 4. The currently available interface to interact with piControl, our Linux kernel driver for the Revolution Pi and modules, is ioctl(2): https://man7.org/linux/man-pages/man2/ioctl.2.html

This is a method to interface with kernel drivers on Linux and is mostly native to C, though there are interfaces for other languages as well. As I'm not familiar with C# I can't recommend any library or anything similar to you.

Our interface using ioctl(2) is documented in picontrol_ioctl(4), that is the man page "picontrol_ioctl" in section 4, available to read on a RevPi system using the command "man 4 picontrol_ioctl". For an example of how to use this in C you can have a look at our source code for piTest: https://gitlab.com/revolutionpi/revpi-p ... lIf.c#L282

I hope this helps!
TheLaughingMan
Posts: 7
Joined: 16 Mar 2024, 22:31

Re: Connect 4 - Digital In

Post by TheLaughingMan »

Thank you for the answer.

I will dig and try to understand if and how this could work in C#.

Meanhwhile..... I can't also find a good guide or video or doc, on how to enable and use the digital in even on Node-Red.

Can you help me pointing out to something viable?
User avatar
dirk
KUNBUS
Posts: 2245
Joined: 15 Dec 2016, 13:19

Re: Connect 4 - Digital In

Post by dirk »

Hi Gabriele, take a look here, hope it helps you to advance in your project:
viewtopic.php?p=16418#p16418
TheLaughingMan
Posts: 7
Joined: 16 Mar 2024, 22:31

Re: Connect 4 - Digital In

Post by TheLaughingMan »

I wanted to thank you Dirk, everything runs fine now!
Post Reply