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: ProyectoARM mbed
Fork of FRDM_TSI by
Revision 7:1e8f28b8e512, committed 2016-06-01
- Comitter:
- dglmgc
- Date:
- Wed Jun 01 00:51:19 2016 +0000
- Parent:
- 6:843833d28602
- Commit message:
- Proyecto David Rodriguez-Douglas Gonzalez
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 |
--- a/TSI.lib Tue May 31 16:20:58 2016 +0000 +++ b/TSI.lib Wed Jun 01 00:51:19 2016 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/TSI/#1a60ef257879 +https://developer.mbed.org/users/dglmgc/code/ProyectoARM/#1a60ef257879
--- a/main.cpp Tue May 31 16:20:58 2016 +0000
+++ b/main.cpp Wed Jun 01 00:51:19 2016 +0000
@@ -32,6 +32,7 @@
float valorant;
float x;
float y;
+ float z;
while (true) {
percent = tsi.readPercentage()*10;
@@ -40,26 +41,32 @@
}
if(valor > 0.80 && valorant < 0.80) {
opt++;
- if(opt > 2) {
+ if(opt > 3) {
opt = 0;
}
} else {
if(opt == 0) {
x = 1.1 - valor;
- led2 = x;
- led = 1;
+ led = x;
+ led2 = 1;
led1 = 1;
}
if(opt == 1) {
y = 1.1 - valor;
- led2 = y;
+ led1 = y;
+ led2 = 1;
led = 1;
- led1 = 1;
}
if(opt == 2) {
- led = x;
+ z = 1.1 - valor;
+ led2 = z;
+ led1 = 1;
+ led = 1;
+ }
+ if(opt == 3) {
+ led2 = z;
led1 = y;
- led2 = 1;
+ led = x;
}
}
wait(0.1);
