SwiftPigpioWrapper - Control GPIO on your Raspberry PI using swift

Hello,

I have developed a wrapper around the `pigpio` library.

`Pigpio` is a library that enables the control of the Raspberry Pi’s GPIO pins.

Therefore, if you are a Swift programmer seeking to begin utilizing a Raspberry Pi’s GPIO, this wrapper may be of particular interest to you.

SwiftPigpioWrapper

2 Likes

Not to undermine your work, but are you aware of GitHub - uraimo/SwiftyGPIO: A Swift library for hardware projects on Linux/ARM boards with support for GPIOs/SPI/I2C/PWM/UART/1Wire. ?

Ciao, Certainly. I have used the library and enjoyed it, but I have some concerns.

The latest library update is from 2024, and it only addresses minor fixes. It appears to be no longer actively maintained. Additionally, to utilize some GPIO functionalities, such as PWM, you require superuser privileges.

I also believe that a more beginner-friendly library is needed. SwiftGPIO, while useful, now requires root permission, which can be cumbersome to use.

For example, if you install Swift on linux using Swiftly basic instructions, it installs everything in the user environment. As a result, `sudo` does not work because Swift is not found, and you must delve into Linux commands. If you are unfamiliar with Linux, this can be a frustrating experience.

With pipio running in daemon mode, you do not need to use `sudo`, and my library supports this.

My project is a simple wrapper with no complex features. However, I believe it is more suitable for beginners.

2 Likes

I have made the same library

It is based on c_periphery

1 Like