Last change
on this file since 226 was 226, checked in by ertl-honda, 8 years ago |
Groveモジュールを使用したサンプルの追加
|
File size:
997 bytes
|
Rev | Line | |
---|
[226] | 1 | #include <Wire.h>
|
---|
| 2 | #include <SeeedGrayOLED.h>
|
---|
| 3 |
|
---|
| 4 |
|
---|
| 5 | void setup()
|
---|
| 6 | {
|
---|
| 7 | Wire.begin();
|
---|
| 8 | SeeedGrayOled.init(); //initialize SEEED Gray OLED display
|
---|
| 9 |
|
---|
| 10 | SeeedGrayOled.clearDisplay(); //clear the screen and set start position to top left corner
|
---|
| 11 | SeeedGrayOled.setNormalDisplay(); //Set display to Normal mode
|
---|
| 12 | SeeedGrayOled.setVerticalMode(); // Set to vertical mode for displaying text
|
---|
| 13 |
|
---|
| 14 | SeeedGrayOled.setTextXY(0,0); //Set the cursor to 0th line, 0th Column
|
---|
| 15 | SeeedGrayOled.putNumber(123); //Print number
|
---|
| 16 | SeeedGrayOled.setTextXY(1,0); //Set the cursor to 1st line, 0th Column
|
---|
| 17 | SeeedGrayOled.putNumber(0xFFFF); //Print number
|
---|
| 18 | SeeedGrayOled.setTextXY(2,0); //Set the cursor to 2nd line, 0th Column
|
---|
| 19 | SeeedGrayOled.putNumber(0xFFFFFFFF); //Print number
|
---|
| 20 | SeeedGrayOled.setTextXY(3,0); //Set the cursor to 3rd line, 0th Column
|
---|
| 21 | SeeedGrayOled.putNumber(-12345); //Print number
|
---|
| 22 |
|
---|
| 23 |
|
---|
| 24 | }
|
---|
| 25 |
|
---|
| 26 | void loop()
|
---|
| 27 | {
|
---|
| 28 |
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.