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:dc9390e62d46, committed 2013-05-25
- Comitter:
- laboratorio
- Date:
- Sat May 25 11:43:31 2013 +0000
- Commit message:
- ADC converter to PWM and show in LCD
Changed in this revision
diff -r 000000000000 -r dc9390e62d46 TextLCD.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TextLCD.lib Sat May 25 11:43:31 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/simon/code/TextLCD/#e4cb7ddee0d3
diff -r 000000000000 -r dc9390e62d46 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sat May 25 11:43:31 2013 +0000
@@ -0,0 +1,37 @@
+#include "mbed.h"
+#include "TextLCD.h"
+
+TextLCD lcd(p5, p6, p7, p8, p9, p10); // rs, e, d4-d7
+
+AnalogIn P1(p15);
+PwmOut led(LED1);
+PwmOut FM(p21);
+
+float Px;
+int PWM;
+
+int main() {
+
+ led.period_ms (150);
+
+ while(1) {
+
+ Px = P1.read();
+
+ if(Px < 0.1){
+ Px = 0.1;
+ }
+ if(Px > 0.9){
+ Px = 0.9;
+ }
+
+ PWM = Px*100;
+ led = Px;
+ FM = Px;
+ Px = Px * 3.3;
+ lcd.printf("S_FMBM = %2d PWM\n",PWM);
+ lcd.printf("V15 = %2.2f V\n",Px);
+ }
+}
+
+
diff -r 000000000000 -r dc9390e62d46 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat May 25 11:43:31 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/b3110cd2dd17 \ No newline at end of file