Open Source
Our repository contains open-source projects that you are free to explore, modify, and contribute to. It includes example source code for Pigeon computers, which can serve as a starting point for your own applications or be adapted to specific use cases.
You can browse or clone the repository at: https://gitlab.com/pigeoncomputers/pigeon-rb-examples.
C library
To build the library:
$ git clone https://gitlab.com/pigeoncomputers/pigeon-rb-examples.git
$ cd pigeon-rb-examples/C/library/
$ chmod u+x makelib
$ ./makelib build
To build the examples:
$ cd examples
$ gcc example-rb100.c -o example-rb100 -lpigeonRB -lwiringPi
$ gcc example-rb300.c -o example-rb300 -lpigeonRB -lwiringPi
$ gcc example-rb700-advance.c -o example-rb700-advance -lpigeonRB -lwiringPi
Note for RB700: Since the libraries use the I2C interface directly, please comment out the following line in the /boot/firmware/config.txt file (or /boot/config.txt in older distributions):
dtoverlay=mcp23017,addr=0x20,gpiopin=23
Run the example program depending on the model you have:
$ ./example-rb100
$ ./example-rb300
$ ./example-rb700-advance
Python examples
Below, we will describe how to run sample programs written in Python.
Download the example programs:
$ git clone https://gitlab.com/pigeoncomputers/pigeon-rb-examples.git
$ cd pigeon-rb-examples/Python/
Make the example script executable. We will choose the script that controls the 'ACT' and 'USR' LEDs on a Pigeon.
sudo chmod +x pigeon_leds.py
Execute the script with root privileges:
sudo python3 pigeon_leds.py
To stop the script, press Ctrl + C in the terminal.