Demonstrates the use a 128x64 I2C OLED display for medium numbers and big numbers font function. You can download OLED I2C library at Rinky-Dink Electronic.
- Arduino Uno
- 128x64 I2C OLED
Video
Coding
#include <OLED_I2C.h>
OLED myOLED(SDA, SCL, 8);
extern uint8_t MediumNumbers[];
extern uint8_t BigNumbers[];
void setup()
{
myOLED.begin();
}
void loop()
{
for (int i=0; i<=100; i++)
{
myOLED.setFont(MediumNumbers);
myOLED.printNumF(float(i)/3, 2, RIGHT, 0);
myOLED.setFont(BigNumbers);
myOLED.printNumI(i, RIGHT, 40);
myOLED.update();
}
myOLED.clrScr();
}
No comments:
Post a Comment