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.
Revision 0:a585e9cb7543, committed 2014-10-24
- Comitter:
- Capper
- Date:
- Fri Oct 24 15:37:12 2014 +0000
- Commit message:
- FRDM-K64F board connected to Sparkfun Nokia 6100 breakout board to read and display analog input values
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NokiaLCD.lib Fri Oct 24 15:37:12 2014 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/Capper/code/NokiaLCD/#51cb48ebad3e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Oct 24 15:37:12 2014 +0000
@@ -0,0 +1,45 @@
+#include "mbed.h"
+#include "NokiaLCD.h"
+
+DigitalOut led(LED_RED);
+AnalogIn ain0(A0);
+AnalogIn ain1(A1);
+AnalogIn ain2(A2);
+AnalogIn ain3(A3);
+AnalogIn ain4(A4);
+AnalogIn ain5(A5);
+NokiaLCD lcd(PTD6, PTD5, PTD4, PTC12, NokiaLCD::PCF8833); // mosi, sclk, cs, rst, type
+int main()
+{
+ lcd.background(0xffffff);
+ lcd.foreground(0x4b0082);
+ lcd.cls();
+ lcd.locate(0,1);
+ lcd.printf(" FRDM-K64F ");
+ while (true) {
+ led = 0;
+ wait(0.2f);
+ lcd.printf(" ");
+ wait(0.2f);
+ lcd.locate(0,4);
+ lcd.printf("AOVDC: %4.1f V ",(ain0.read()*3.3));
+ wait(0.2f);
+ lcd.locate(0,5);
+ lcd.printf("A1VDC: %4.1f V ",(ain1.read()*3.3));
+ wait(0.2f);
+ lcd.locate(0,6);
+ lcd.printf("A2VDC: %4.1f V ",(ain2.read()*3.3));
+ wait(0.2f);
+ lcd.locate(0,7);
+ lcd.printf("A3VDC: %4.1f V ",(ain3.read()*3.3));
+ wait(0.2f);
+ lcd.locate(0,8);
+ lcd.printf("A4VDC: %4.1f V ",(ain4.read()*3.3));
+ wait(0.2f);
+ lcd.locate(0,9);
+ lcd.printf("A5VDC: %4.1f V ",(ain5.read()*3.3));
+ wait(0.2f);
+ led = 1;
+ wait(0.2f);
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Oct 24 15:37:12 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/552587b429a1 \ No newline at end of file