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:c82dcc0ff914, committed 2021-08-18
- Comitter:
- t00214916
- Date:
- Wed Aug 18 15:08:39 2021 +0000
- Commit message:
- Potentiometer experiment
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/C12832.lib Wed Aug 18 15:08:39 2021 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/chris/code/C12832/#7de323fa46fe
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Aug 18 15:08:39 2021 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+#include "C12832.h" // LCD on Mbed
+
+PwmOut led1 (LED1); // Control the brightness of LED1
+AnalogIn pot1 (p19); //Used to change brightness
+C12832 lcd(p5, p7, p6, p8, p11); // Register the pins needed for LCD
+
+int main()
+{
+
+ while(1) {
+ led1 = pot1; // LED1 the same value as POT1
+ lcd.locate(0,0); // Area on LCD to start text
+ lcd.printf("Potentiometer value 1 = %.2f", pot1.read());
+
+ lcd.locate(0,10);
+ lcd.printf("Potentiometer value 2 = %.2e", pot1.read());
+
+ wait(0.5);
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Aug 18 15:08:39 2021 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file