Rev | Line | |
---|
[242] | 1 | #include <Wire.h>
|
---|
| 2 | #include <SeeedOLED.h>
|
---|
| 3 |
|
---|
| 4 |
|
---|
| 5 | void setup()
|
---|
| 6 | {
|
---|
| 7 | Wire.begin();
|
---|
| 8 | SeeedOled.init(); //initialze SEEED OLED display
|
---|
| 9 | DDRB|=0x21;
|
---|
| 10 | PORTB |= 0x21;
|
---|
| 11 |
|
---|
| 12 | SeeedOled.clearDisplay(); //clear the screen and set start position to top left corner
|
---|
| 13 | SeeedOled.setNormalDisplay(); //Set display to Normal mode
|
---|
| 14 | SeeedOled.setPageMode(); //Set addressing mode to Page Mode
|
---|
| 15 | SeeedOled.setTextXY(0,0); //Set the cursor to 0th Page, 0th Column
|
---|
| 16 | SeeedOled.putNumber(123); //Print number
|
---|
| 17 | SeeedOled.setTextXY(1,0); //Set the cursor to 1st Page, 0th Column
|
---|
| 18 | SeeedOled.putNumber(0xFFFF); //Print number
|
---|
| 19 | SeeedOled.setTextXY(2,0); //Set the cursor to 2nd Page, 0th Column
|
---|
| 20 | SeeedOled.putNumber(0xFFFFFFFF); //Print number
|
---|
| 21 | SeeedOled.setTextXY(3,0); //Set the cursor to 3rd Page, 0th Column
|
---|
| 22 | SeeedOled.putNumber(-12345); //Print number
|
---|
| 23 |
|
---|
| 24 |
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | void loop()
|
---|
| 28 | {
|
---|
| 29 |
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.