This program is a PWM which varies the dutty cycle by the touchpad of FRDM KL25Z. We can observe the result with the variation of RGBled intensity

Dependencies:   TSI mbed

Files at this revision

API Documentation at this revision

Comitter:
lcorralesc1
Date:
Sun Dec 15 15:34:21 2013 +0000
Commit message:
This program is a PWM which varies the dutty cycle by the touchpad of FRDM KL25Z. We can observe the result with the variation of RGBled intensity

Changed in this revision

TSI.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TSI.lib	Sun Dec 15 15:34:21 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/main.cpp	Sun Dec 15 15:34:21 2013 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+#include "TSISensor.h"
+
+int main(void) {
+    PwmOut led(LED_GREEN);  
+    PwmOut Salida(PTD4);
+    TSISensor tsi;
+    
+    while (true) {
+     if (tsi.readPercentage()!=0) // Asignacion de Luminosidad del led
+     {
+        led = 1.0 - tsi.readPercentage(); // Coordenadas del la asignacion del led 
+        Salida=1.0 - tsi.readPercentage();
+        wait(0.1); // Tiempo de es espera para retomar el ciclo
+        
+     }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Dec 15 15:34:21 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f
\ No newline at end of file