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
00001 #include "mbed.h" 00002 #include "NokiaLCD.h" 00003 00004 DigitalOut led(LED_RED); 00005 AnalogIn ain0(A0); 00006 AnalogIn ain1(A1); 00007 AnalogIn ain2(A2); 00008 AnalogIn ain3(A3); 00009 AnalogIn ain4(A4); 00010 AnalogIn ain5(A5); 00011 NokiaLCD lcd(PTD6, PTD5, PTD4, PTC12, NokiaLCD::PCF8833); // mosi, sclk, cs, rst, type 00012 int main() 00013 { 00014 lcd.background(0xffffff); 00015 lcd.foreground(0x4b0082); 00016 lcd.cls(); 00017 lcd.locate(0,1); 00018 lcd.printf(" FRDM-K64F "); 00019 while (true) { 00020 led = 0; 00021 wait(0.2f); 00022 lcd.printf(" "); 00023 wait(0.2f); 00024 lcd.locate(0,4); 00025 lcd.printf("AOVDC: %4.1f V ",(ain0.read()*3.3)); 00026 wait(0.2f); 00027 lcd.locate(0,5); 00028 lcd.printf("A1VDC: %4.1f V ",(ain1.read()*3.3)); 00029 wait(0.2f); 00030 lcd.locate(0,6); 00031 lcd.printf("A2VDC: %4.1f V ",(ain2.read()*3.3)); 00032 wait(0.2f); 00033 lcd.locate(0,7); 00034 lcd.printf("A3VDC: %4.1f V ",(ain3.read()*3.3)); 00035 wait(0.2f); 00036 lcd.locate(0,8); 00037 lcd.printf("A4VDC: %4.1f V ",(ain4.read()*3.3)); 00038 wait(0.2f); 00039 lcd.locate(0,9); 00040 lcd.printf("A5VDC: %4.1f V ",(ain5.read()*3.3)); 00041 wait(0.2f); 00042 led = 1; 00043 wait(0.2f); 00044 } 00045 }
Generated on Thu Jul 28 2022 04:19:10 by
1.7.2