Nokia 5110 test stm32 nucleo pins working with Chris Yang's NOKIA_5110 library

Dependencies:   NOKIA_5110 mbed

Fork of Nokia5110_KL25Z by Thiha Electronics

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "NOKIA_5110.h"
00003 
00004 int main() {
00005     
00006     LcdPins myPins;   
00007 
00008 //    myPins.sce  = PB_6;   
00009     myPins.sce  = PA_9;  
00010     myPins.rst  = PA_6;
00011     myPins.dc   = PA_8;
00012     myPins.mosi = PA_7;//SPI_MOSI;
00013     myPins.miso = NC;
00014     myPins.sclk = PA_5;//SPI_SCK;
00015     
00016     // Start the LCD
00017     NokiaLcd myLcd( myPins );
00018 
00019     myLcd.InitLcd();                // LCD is reset and DDRAM is cleared
00020     myLcd.DrawString("Hello");   
00021     while(1)
00022     {   };
00023 }