#include #include using namespace std; int main() { ofstream gpio_18; gpio_18.open("/sys/class/gpio/gpio18/value"); //The main LED blinking loop for (int i=0; i<4; i++) { gpio_18 << "1"; gpio_18.flush(); sleep(1); gpio_18 << "0"; gpio_18.flush(); sleep(1); } gpio_18.close(); return 0; }