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.
main.cpp
- Committer:
- domemort
- Date:
- 2022-01-20
- Revision:
- 0:7521590a4d52
File content as of revision 0:7521590a4d52:
#include "mbed.h"
#include "C12832.h"
C12832 lcd(SPI_MOSI, SPI_SCK, SPI_MISO, p8, p11);
static char logo[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE7, 0x1C, 0xE0,
0x00, 0xE7, 0x1C, 0xE0, 0x00, 0xFF, 0xFF, 0xF8, 0x03, 0xFF, 0xFF, 0xF8, 0x03, 0xE4, 0x17, 0x78,
0x03, 0xDF, 0x72, 0x60, 0x00, 0xDF, 0x75, 0x60, 0x00, 0xEF, 0x77, 0x78, 0x03, 0xF7, 0x77, 0x78,
0x03, 0xF7, 0x77, 0x78, 0x03, 0xCF, 0x77, 0x60, 0x00, 0xFF, 0xFF, 0xE0, 0x00, 0xF1, 0xE3, 0xF8,
0x03, 0xFE, 0xFD, 0xF8, 0x03, 0xFD, 0xFD, 0xF8, 0x03, 0xFE, 0xFB, 0xE0, 0x00, 0xFE, 0xF7, 0xE0,
0x00, 0xF1, 0xE1, 0xE0, 0x03, 0xFF, 0xFF, 0xF8, 0x03, 0xFF, 0xFF, 0xF8, 0x03, 0xFF, 0xFF, 0xF8,
0x00, 0xE7, 0x1C, 0xE0, 0x00, 0xE7, 0x1C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
Bitmap bitmlogo = {
34, // XSize
29, // YSize
4, // Bytes in Line
logo, // Pointer to picture data
};
int main() {
printf("Demo by Peter Dresche\n");
printf("https://os.mbed.com/users/dreschpe/code/Christmas-LCD\n");
int i, s;
lcd.cls();
// lcd.set_font((unsigned char*) Arial_9);
s = 3;
lcd.print_bm(bitmlogo, 95, 0); // print logo
lcd.copy_to_lcd();
lcd.locate(5, 5);
lcd.printf("Elettronica");
lcd.locate(5, 17);
lcd.printf("per IoT 2021");
lcd.copy_to_lcd();
printf("Done!\n");
}