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.
Dependencies: TSI TextLCD mbed
Revision 0:ae7305f55ecf, committed 2013-12-11
- Comitter:
- amarincan
- Date:
- Wed Dec 11 13:11:15 2013 +0000
- Commit message:
- se modifico una funcion private to public
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TSI.lib Wed Dec 11 13:11:15 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/vsluiter/code/TSI/#4dc2f5a3a731
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TextLCD.lib Wed Dec 11 13:11:15 2013 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/simon/code/TextLCD/#44f34c09bd37
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Dec 11 13:11:15 2013 +0000
@@ -0,0 +1,44 @@
+#include "mbed.h"
+#include "TSISensor.h"
+#include "TextLCD.h"
+
+
+float value=0,valuev=0;
+TextLCD lcd(PTB10, PTB11, PTE2, PTE3, PTE4, PTE5); // rs, e, d4-d7
+
+int main(void) {
+
+ //lcd.writeCommand(0x0E);
+
+
+ PwmOut led(LED_BLUE);
+ PwmOut pin(PTD4);
+ float p=0.003;
+ led.period(p);
+ //pin.pulsewidth(p);
+ pin.period(p);
+ lcd.printf("Periodo=%gs",p);
+ lcd.locate(0,1);
+ lcd.printf("cycle duty=0");
+ TSISensor tsi;
+ led = 1;
+ int d;
+ while (true) {
+ value=tsi.readPercentage();
+ if(value!=valuev && value!=0)
+ {
+
+ // pin = 1.0 - value;
+ pin.write(1.0 - value);
+ led.write(value);
+ d=(1-value)*100;
+ lcd.locate(0,1);
+ lcd.printf(" ");
+ lcd.locate(0,1);
+ lcd.printf("cycle duty=%d",d);
+ valuev=value;
+ }
+ // wait(0.1);
+
+}
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.lib Wed Dec 11 13:11:15 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/#a9913a65894f