Last change
on this file since 226 was 226, checked in by ertl-honda, 8 years ago |
Groveモジュールを使用したサンプルの追加
|
File size:
690 bytes
|
Rev | Line | |
---|
[226] | 1 | #include <Wire.h>
|
---|
| 2 | #include <SeeedGrayOLED.h>
|
---|
| 3 | #include <avr/pgmspace.h>
|
---|
| 4 |
|
---|
| 5 |
|
---|
| 6 | void setup()
|
---|
| 7 | {
|
---|
| 8 | Wire.begin();
|
---|
| 9 | Serial.begin(9600);
|
---|
| 10 | SeeedGrayOled.init(); // initialize SEEED OLED display
|
---|
| 11 | SeeedGrayOled.setInverseDisplay(); // Set display to inverse mode
|
---|
| 12 | SeeedGrayOled.clearDisplay(); // Clear Display.
|
---|
| 13 | SeeedGrayOled.setVerticalMode(); // Set to vertical mode for displaying text
|
---|
| 14 |
|
---|
| 15 | for(char i=0; i < 12 ; i++)
|
---|
| 16 | {
|
---|
| 17 | SeeedGrayOled.setTextXY(i,0); //set Cursor to ith line, 0th column
|
---|
| 18 | SeeedGrayOled.setGrayLevel(i); //Set Grayscale level. Any number between 0 - 15.
|
---|
| 19 | SeeedGrayOled.putString("Hello World"); //Print Hello World
|
---|
| 20 | }
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | void loop()
|
---|
| 24 | {
|
---|
| 25 |
|
---|
| 26 | }
|
---|
| 27 |
|
---|
| 28 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.