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.
Diff: OLEDTest.cpp
- Revision:
- 18:6ab8b740e55a
- Parent:
- 17:b116da3bffbb
--- a/OLEDTest.cpp Mon Apr 19 19:21:26 2021 +0000 +++ b/OLEDTest.cpp Mon Apr 26 07:54:19 2021 +0000 @@ -1,18 +1,6 @@ -/* - * Copyright (c) 2012 Neal Horman - http://www.wanlink.com - * - * License: MIT open source (http://opensource.org/licenses/MIT) - * Summary; - * Use / modify / distribute / publish it how you want and - * if you use it, or don't, you can't hold me liable for how - * it does or doesn't work. - * If it doesn't work how you want, don't use it, or change - * it so that it does work. - */ - #include "mbed.h" #include "Adafruit_SSD1306.h" -#include "platform/mbed_thread.h" //Muss immer rein +#include "platform/mbed_thread.h" #define SCREEN_ADRESS 0x3D DigitalOut myled(LED1); @@ -34,14 +22,13 @@ }; -I2CPreInit gI2C(I2C_SDA, I2C_SCL); //I2CPreInit gI2C(d9,d10); -Adafruit_SSD1306_I2c gOled2(gI2C,D4,0x7A,64,128); //Adafruit_SSD1306_I2c gOled2(gI2C,p27); +I2CPreInit gI2C(I2C_SDA, I2C_SCL); +Adafruit_SSD1306_I2c gOled2(gI2C,D4,0x7A,64,128); //D4: Adresse für reset, 0x7A: I2C Adresse int main() { uint16_t i=0; - //gOled2.begin(SSD1306_SWITCHCAPVCC); thread_sleep_for(1000); - pc.set_baud(9600); //baudrate + pc.set_baud(9600); //baudrate gOled2.clearDisplay(); gOled2.drawPixel (10, 10,WHITE); gOled2.display(); @@ -58,6 +45,5 @@ myled = !myled; thread_sleep_for(1000); gOled2.clearDisplay(); - //printf("%d",i); } } \ No newline at end of file