diff options
| author | James Barnett <noreply@jamesbarnett.xyz> | 2013-12-10 23:04:53 +0000 |
|---|---|---|
| committer | James Barnett <noreply@jamesbarnett.xyz> | 2013-12-10 23:04:53 +0000 |
| commit | de40617213743c0479362c6820f4ca8692d017c1 (patch) | |
| tree | b3199a71a9ab68ebf63080684ee219fa37d04e08 /test.ino | |
| parent | 20c12edd7f8dd5c28aab47fe9cdaac1da9001f0a (diff) | |
| download | ArduinoOLEDLibrary-de40617213743c0479362c6820f4ca8692d017c1.tar.xz ArduinoOLEDLibrary-de40617213743c0479362c6820f4ca8692d017c1.zip | |
Library and example sketch
Diffstat (limited to 'test.ino')
| -rw-r--r-- | test.ino | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test.ino b/test.ino new file mode 100644 index 0000000..491d9b3 --- /dev/null +++ b/test.ino @@ -0,0 +1,25 @@ +#include <OLEDFourBit.h> + +// see datasheet for pinouts +#define RS 12 //RegisterSelect +#define RW 10 //ReadWrite +#define E 11 //Enable +#define DB4 4 //4bit DataBus +#define DB5 5 +#define DB6 6 +#define DB7 7 + +OLEDFourBit oled(RS, RW, E, DB4, DB5, DB6, DB7); + +void setup() +{ + oled.begin(20,4); + oled.print("Hello World!"); +} + +void loop() +{ + oled.setCursor(0,1); + oled.print(millis()/1000); +} + |