]> git.gir.st - hardpass.git/blame_incremental - oled/oled_clear.cpp
cleanup tracks around xtal
[hardpass.git] / oled / oled_clear.cpp
... / ...
CommitLineData
1#include "ArduiPi_OLED_lib.h"
2#include "Adafruit_GFX.h"
3#include "ArduiPi_OLED.h"
4
5#include <getopt.h>
6#include <stdio.h>
7
8#define ERR_FAIL 0
9//yes, this is irritating to unix users, but a return val >= 1 will mean nth item selected
10ArduiPi_OLED display; // Instantiate the display
11
12// Config Option
13struct s_opts {
14 int oled;
15 int verbose;
16} ;
17
18// default options values
19s_opts opts = {
20 3, // my .96" oled
21 false // Not verbose
22};
23
24int main(int argc, char **argv)
25{
26 if ( !display.init(OLED_I2C_RESET,opts.oled) ) {
27 return ERR_FAIL;
28 }
29
30 display.begin();
31
32 display.clearDisplay(); // clears the screen buffer
33 display.display(); // display it (clear display)
34
35 display.close(); // Free PI GPIO ports
36}
37
38
Imprint / Impressum