You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
William Stevens edited this page Jul 16, 2018
·
2 revisions
This Wiki page details how to use C or C++ to control a Flipper board.
Install libflipper
To use Flipper from Python you will need to install libflipper.
Navigate to the root of the repository and run the install command. If you already ran an install from the top level repository you can skip this step as libflipper will already be installed.
make install-libflipper
Make the LED turn blue
main.c
#include<flipper.h>intmain(intargc, char*argv[]) {
flipper_attach(); // Attach a Flipper boardled.rgb(0, 0, 10); // Turn the LED bluereturn0;
}
and build
gcc -o main main.c -lflipper
Turning on an IO pin
main.c
#include<flipper.h>intmain(intargc, char*argv[]) {
flipper_attach(); // Attach a Flipper boardgpio.enable(IO_4, 0); // Set IO4 as an outputgpio.write(IO_4, 0); // Set IO4 HIGHreturn0;
}