Skip to content

Instantly share code, notes, and snippets.

View sammonius's full-sized avatar

Samuel Ammonius sammonius

View GitHub Profile
@llbit
llbit / water.c
Last active December 26, 2023 08:11
Raspberry Pi GPIO pins via C
// Compile with $ gcc water.c -o water
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
// Pin modes:
#define INPUT (0)
#define OUTPUT (1)
#define LOW (0)
#define HIGH (1)