oled.setCursor(0,0);
oled.print("_`abcdefghijklmnopqrs");
oled.display();
delay(1000);
oled.clear(PAGE);
oled.setCursor(0,0);
oled.print("tuvwxyz{|}~");
oled.display();
delay(1000);
//Demonstratefont2.10x16.Onlynumbersand'.'aredefin
ed.
//Thisfontlookslike7segmentdisplays.
//Letsusethisbigishfonttodisplayreadingsfromthe
//analogpins.
for (int i=0;i<25;i++)
{
oled.clear(PAGE);//Clearthedisplay
oled.setCursor(0,0);
//Setcursortotopleft
oled.setFontType(0);//Smallestfont
oled.print("A0:");//Print"A0"
oled.setFontType(2);//7segmentfont
oled.print(analogRead(A0));//Printa0reading
oled.setCursor(0,16);//Setcursortotopmiddlel
eft
oled.setFontType(0);//Repeat
oled.print("A1:");
oled.setFontType(2);
oled.print(analogRead(A1));
oled.setCursor(0,32);
oled.setFontType(0);
oled.print("A7:");
oled.setFontType(2);
oled.print(analogRead(A7));
oled.display();
delay(100);
}
//Demonstratefont3.12x48.Stopwatchdemo.
ole
d.setFontType(3);//Usethebiggestfont
int ms=0;
int s=0;
while (s<= 50)
{
oled.clear(PAGE);//Clearthedisplay
oled.setCursor(0,0);//Setcursortotopleft
if (s< 10)
oled.print("00");//Print"00"ifsis1digit
else if (s< 100)
oled.print("0");//Print"0"ifsis2digits
o
led.print(s);//Prints'svalue
oled.print(":");//Print":"
oled.print(ms);//Printmsvalue
oled.display();//Drawonthescreen
ms++;//Incrementms
if (ms>= 10)//Ifmsis>=10
{
ms=0;//Setmsbackto0
s++;//andincrements
}
delay(1);
}
}
//Ce
nterandprintasmalltitle
Page 10 of 1
2
// This function is quick and dirty. Only works for titles one
// line long.
void printTitle(String title, int font)
{
int middleX = oled.getLCDWidth() / 2;
int middleY = oled.getLCDHeight() / 2;
oled.clear(PAGE);
oled.setFontType(font);
// Try to set the cursor in the middle of the screen
oled.setCursor(middleX (oled.getFontWidth() * (title.lengt
h()/2)),
middleY (oled.getFontWidth() / 2));
// Print the title:
oled.print(title);
oled.display();
delay(1500);
oled.clear(PAGE);
}
Now, click the ‘flash’ button (the one that looks like a lightning bolt) and wait
for the magic to begin!
Resources & Going Further
Here are a few links that should help with any further questions you may
have about the Photon OLED Shield:
Photon OLED Shield Github - for schematics and board design files
SparkFun OLED Particle Libarary – this is where to go for the
firmware library and example code
Particle Documentation Pages – go here to set up and configure your
Photon (or other Particle devices)
Particle Community Forum – anything that you couldn’t find in the
docs should be easily found in the community forum. If you are
having trouble, search this forum first, as many of the answers are
there already.
Going Further
Now that you’re comfortable with the Photon OLED Shield and its Particle
library, what are you going to make with it? Need some inspiration, check
out these related tutorials:
OLED Display Hookup Guide
A
simple hookup guide to get you
started with the OLED LCD.
Serial Graphic LCD Hookup
Learn how to use the Serial Graphic
LCD.
RGB Panel Hookup Guide Reaction Timer
Page 11 of 1
2
The OLED Shield pairs very well with any of our other Photon Shields;
check out our hookup guides for those shields:
Make bright, colorful displays using
the 32x32 and 32x16 RGB LED
panels. This hookup guide shows
how to hook up these panels and
control them with an Arduino.
Demonstrate mental chronometry
with this simple reaction timer!
Photon Battery Shield
Hookup Guide
The Photon Battery Shield has
everything your Photon needs to run
off, charge, and monitor a LiPo
battery. Read through this hookup
guide to get started using it.
Photon Wearable Shield
Hookup Guide
Learn how to use the Photon
Wearable Shield for your next
projects!
Photon IMU Shield Hookup
Guide
Learn how to use the SparkFun
Photon IMU Shield for your Photon
device which houses an on-board
LSM9DS1 system-in-a-chip that
houses a 3-axis accelerometer,
3-axis gyroscope, and 3-axis
magnetometer.
Page 1
2
of 1
2
10
/
22
/
201
htt
p
s://learn.s
p
arkfun.com/tutorials/
p
hoto
n
-ole
d
-shiel
d
-hooku
p
-
g
uide?
_g
a=1.239620163....

DEV-13628

Mfr. #:
Manufacturer:
SparkFun
Description:
Display Development Tools PhotonMicro OLED Shield
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet