Using D for Raspberry Pi expirements
Dave Chapman
donte5379 at comcast.net
Thu Sep 26 17:26:25 UTC 2019
On Thursday, 26 September 2019 at 00:10:40 UTC, aberba wrote:
> On Wednesday, 25 September 2019 at 23:56:45 UTC, aberba wrote:
>> I'm looking for resources on using D for basic Raspberry Pi
>> programming...stuff like turning on and off an LED light. I
>> believe it requires being able to call the Raspberry OS core
>> APIs from D as available in Python.
>
> Just found this package dating back from May 2016...let's see
> what it can do
> (https://github.com/fgheorghe/D-Lang-Raspbian-GPIO-Module)
>
>>
>> Anyone here tried something like that using D?
I've been using
https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/ . It
is a C library written by Bartosz Golaszewski. He is actively
working on it. The latest update is a week old. It has the
advantage that you don't have to use sudo to access the gpio
pins. It comes with a set of tools written in C that I have been
converting to D. Since my knowledge of both D and C is weak it
has taken me some time to get things going. I have a hand written
D bindings file that is incomplete and of amateur quality. So far
I have converted 2 of the 6 command line tools that Bartosz
Golaszewski provided to to work with the library.
David Chapman
More information about the Digitalmars-d-learn
mailing list