rasProject_01 / weSweetHome  R. 146 2026-09-26
process control       /     RasPi software         by   weinert-automation
Loading...
Searching...
No Matches
rdGnBlink.c File Reference

A simple output program for Raspberry's GPIO pins. More...

#include "arch/config.h"
#include <stdlib.h>
#include <stdio.h>
#include <pigpio.h>
#include <pigpiod_if2.h>
#include <unistd.h>
#include <signal.h>
#include "weGPIOd.h"
#include "weLockWatch.h"

Variables

char const prgNamPure []
 The pure program name.
char const prgSVNdat []
 The complete SVN date string.
char const prgSVNrev []
 The complete SVN revision string.

Detailed Description

A simple output program for Raspberry's GPIO pins.

Copyright (c) 2024 Albrecht Weinert
weinert-automation.de a-weinert.de
/ / /\
/ /___ / \ |
\ /____\ /____\ | _|__
\ /\ / \ / \| |
\/ \/ \__/ \__/|_

Revision history

110 (5.01.2026)
Rev. 210 02.012026 : comments

This is a second simple GPIO pin output program using pigpio(d), as does gnBlinkSimple.c. Additionally, it has features qualifying it as a process control service. It locks gpio, it can run endlessly and it cleans up when ended. Hence, it may be the germ cell of of simple real time control applications.

Compile on Pi by: gcc -lpigpiod_if2 -I./include -o rdGnBlink rdGnBlink.c gcc -lpigpiod_if2 -I./include -c -o weRasp/weLockWatch.o weRasp/weLockWatch.c gcc -lpigpiod_if2 -I./include -c -o weRasp/sysBasic.o weRasp/sysBasic.c

Compile on Windows by:

arm-linux-gnueabihf-gcc -DF_CPU=1200000000 -DPLATFORM=raspberry_03 -DMCU=BCM2837 -DTARGET=Pi4all -I./include -c -o rdGnBlink.o rdGnBlink.c
arm-linux-gnueabihf-gcc -DF_CPU=1200000000 -DPLATFORM=raspberry_03 -DMCU=BCM2837 -DTARGET=Pi4all -I./include -c -o weRasp/weLockWatch.o weRasp/weLockWatch.c
arm-linux-gnueabihf-gcc -DF_CPU=1200000000 -DPLATFORM=raspberry_03 -DMCU=BCM2837 -DTARGET=Pi4all -I./include -c -o weRasp/sysBasic.o weRasp/sysBasic.c
cp rdGnBlink.elf rdGnBlink
winscp.com /script=progTransWin /parameter sweet:0123 targetPi bin gnBlinkSimple

or better by using make:

make PROGRAM=rdGnBlink TARGET=pi4play clean all
make PROGRAM=rdGnBlink TARGET=pi4play progapp

If not having made the usual lock file for pigpiod do

touch ~/bin/.lockPiGpio

Variable Documentation

◆ prgNamPure

char const prgNamPure[]

The pure program name.

To be provided in the application's / program's source.

See also
progNam() progNamB()

◆ prgSVNrev

char const prgSVNrev[]

The complete SVN revision string.

To be provided in the application's / program's source.

See also
progRev()

◆ prgSVNdat

char const prgSVNdat[]

The complete SVN date string.

To be provided in the application's / program's source.

See also
progDat()