A basic c library for using Pidee in conjuction with WiringPi:
- A global
pidee_featurestruct initialised for each feature (pidee_feature_dip_1,pidee_feature_button,pidee_feature_led_red, etc). These structs contains the name of the feature, the BCM pin number and feature type. - A
pidee_feature_setupfunction for initialising each feature without sudo.wiringPiSetupSysneeds to be called in your code after allpidee_feature_setupfunctions have been called. - A
pidee_feature_readandpidee_feature_writefunction. - A
pidee_feature_enable_interuptfunction for use with eachpidee_feature'sinterupt_handler. The interupt handler will be passed the relevantpidee_featureas an argument. This is the purpose of the library. WiringPi interupt functions are not passed any context.
- flash-leds
- print-dip
- print-dip-table
- watch-button
- watch-dip
Clone the repo:
git clone https://github.com/Pidee/libpidee.git
cd pidee
Build test applications:
cd examples/
make -j4
Note add -j4 on the Raspberry 2 and 3 only.
Run a test application:
cd examples/bin/
./flash-leds
Rebuild all examples:
make clean
make -j4