![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Programa para modificar imagenes en OLED Cuenta con librerias de algunas imagenes como ejemplo
Dependencies: GameOver MikeWachowski SSD1306_128x64_I2C flechaarriba mbed sobrepeso stop
Fork of DisplayOled1 by
Diff: main.cpp
- Revision:
- 2:5d1c146e04d4
- Parent:
- 1:7195b6d24cf4
diff -r 7195b6d24cf4 -r 5d1c146e04d4 main.cpp --- a/main.cpp Tue May 23 18:39:12 2017 +0000 +++ b/main.cpp Fri Sep 22 23:00:52 2017 +0000 @@ -1,20 +1,72 @@ #include "mbed.h" + #include "flechaabajo.h" + #include "flechaarriba.h" + #include "stop.h" + #include "sobrepeso.h" + #include "GameOver.h" + #include "Mike.h" #include "SSD1306.h" - #define D_SDA PTE25 - #define D_SCL PTE24 + #define D_SDA PTC11 + #define D_SCL PTC10 I2C i2c(D_SDA, D_SCL); + //Serial pc(USBTX, USBRX); // tx, rx + //Serial device(PTE0, PTE1); + char x; + SSD1306 oled = SSD1306(i2c, SSD1308_SA0); int main() { - oled.writeString(0, 0, "Universidad Distrital"); - // oled.printf("Hello World !"); - wait(1); - - oled.writeString(0, 0, "2017 Digitales II"); - - + // if(device.readable()) { + // pc.putc(device.getc()); + //oled.writeString(0,3,"Andres perra"); + // } + + oled.writeBitmap((uint8_t*) Pikachu); + /*oled.setDisplayOff(); + wait(0.2); + oled.setDisplayOn(); + wait(0.2); + oled.writeBitmap((uint8_t*) sobrepeso); + oled.setDisplayOff(); + wait(0.2); + oled.setDisplayOn(); + wait(0.2); + oled.writeBitmap((uint8_t*) sobrepeso); + oled.setDisplayOff(); + wait(0.2); + oled.setDisplayOn(); + wait(0.2); + oled.writeBitmap((uint8_t*) sobrepeso); + oled.setDisplayOff(); + wait(0.2); + oled.setDisplayOn(); + wait(0.2); + oled.writeBitmap((uint8_t*) sobrepeso); + oled.setDisplayOff(); + wait(0.2); + oled.setDisplayOn();*/ + + + + while(1){ + + + /*device.getc(); + if (x=='a'){ + oled.writeString(1, 3, "Primer Piso"); + } + if (x=='b'){ + oled.writeString(1, 3, "Segundo Piso"); + } + if (x=='c'){ + oled.writeString(1, 3, "Tercer Piso"); + } + if (x=='d'){ + oled.writeString(1, 3, "Cuarto Piso"); + }*/ + } }