Page 1 of 1

Connect 4 - Digital In

Posted: 12 Feb 2025, 17:15
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

Re: Connect 4 - Digital In

Posted: 13 Feb 2025, 08:14
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!

Re: Connect 4 - Digital In

Posted: 13 Feb 2025, 09:34
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?

Re: Connect 4 - Digital In

Posted: 13 Feb 2025, 15:01
by dirk
Hi Gabriele, take a look here, hope it helps you to advance in your project:
viewtopic.php?p=16418#p16418

Re: Connect 4 - Digital In

Posted: 07 Mar 2025, 19:09
by TheLaughingMan
I wanted to thank you Dirk, everything runs fine now!