Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Adafruit_GFX mbed
Fork of I2C_SSD1306_Helloworld_WIZwiki-W7500 by
main.cpp@13:52e9c29e2f88, 2017-04-19 (annotated)
- Committer:
 - jcm931213
 - Date:
 - Wed Apr 19 04:07:40 2017 +0000
 - Revision:
 - 13:52e9c29e2f88
 - Parent:
 - 12:f7375e185594
 - Child:
 - 14:8064e493e35a
 
delete i2c.start, i2c.frequency
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| kaizen | 0:81a58b2fb28e | 1 | #include "mbed.h" | 
| kaizen | 0:81a58b2fb28e | 2 | #include "Adafruit_SSD1306.h" | 
| IOP | 8:e61e86355653 | 3 | |
| IOP | 10:abbd34fe7ce1 | 4 | DigitalOut myled_R(LED_RED); | 
| kaizen | 0:81a58b2fb28e | 5 | |
| WIzMatthew | 12:f7375e185594 | 6 | I2C i2c(PA_10,PA_9); | 
| kaizen | 0:81a58b2fb28e | 7 | |
| WIzMatthew | 12:f7375e185594 | 8 | Adafruit_SSD1306_I2c myOled(i2c,NC,0x78,64,128); | 
| WIzMatthew | 12:f7375e185594 | 9 | |
| kaizen | 0:81a58b2fb28e | 10 | |
| kaizen | 0:81a58b2fb28e | 11 | int main() | 
| IOP | 9:a6021ca48d2e | 12 | { | 
| IOP | 9:a6021ca48d2e | 13 | uint16_t x=0; | 
| jcm931213 | 13:52e9c29e2f88 | 14 | |
| IOP | 9:a6021ca48d2e | 15 | myOled.begin(); | 
| WIzMatthew | 12:f7375e185594 | 16 | myOled.printf("%ux%u \nHellow World\r\n", myOled.width(), myOled.height()); | 
| IOP | 9:a6021ca48d2e | 17 | myOled.display(); | 
| kaizen | 0:81a58b2fb28e | 18 | |
| kaizen | 0:81a58b2fb28e | 19 | while(1) | 
| kaizen | 0:81a58b2fb28e | 20 | { | 
| IOP | 8:e61e86355653 | 21 | myled_R = !myled_R; | 
| IOP | 9:a6021ca48d2e | 22 | myOled.printf("%u\r",x); | 
| IOP | 9:a6021ca48d2e | 23 | myOled.display(); | 
| IOP | 9:a6021ca48d2e | 24 | x = x + 1; | 
| IOP | 9:a6021ca48d2e | 25 | wait(1.0); | 
| kaizen | 0:81a58b2fb28e | 26 | } | 
| kaizen | 0:81a58b2fb28e | 27 | } | 
