source: rtos_arduino/trunk/examples/NCESIoT/LCD_Display9696/examples/OLED_Hello_World/OLED_Hello_World.ino@ 226

Last change on this file since 226 was 226, checked in by ertl-honda, 8 years ago

Groveモジュールを使用したサンプルの追加

File size: 647 bytes
Line 
1#include <Wire.h>
2#include <SeeedGrayOLED.h>
3#include <avr/pgmspace.h>
4
5
6void setup()
7{
8 Wire.begin();
9 SeeedGrayOled.init(); //initialize SEEED OLED display
10 SeeedGrayOled.clearDisplay(); //Clear Display.
11 SeeedGrayOled.setNormalDisplay(); //Set Normal Display Mode
12 SeeedGrayOled.setVerticalMode(); // Set to vertical mode for displaying text
13
14 for(char i=0; i < 12 ; i++)
15 {
16 SeeedGrayOled.setTextXY(i,0); //set Cursor to ith line, 0th column
17 SeeedGrayOled.setGrayLevel(i); //Set Grayscale level. Any number between 0 - 15.
18 SeeedGrayOled.putString("Hello World"); //Print Hello World
19 }
20}
21
22void loop()
23{
24
25}
26
27
Note: See TracBrowser for help on using the repository browser.