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: mbed
Diff: main.cpp
- Revision:
- 1:a0a660d54a0b
- Parent:
- 0:cdadc6b7f2d1
--- a/main.cpp Fri May 29 18:35:12 2020 +0000
+++ b/main.cpp Fri May 29 19:23:13 2020 +0000
@@ -24,7 +24,7 @@
void seno()
{
-while(j!=100){
+while(j!=25){
j++;
for (int i=0; i <361; i++) {
@@ -36,19 +36,19 @@
Bus = n;
- // pc.printf("\r\t%1.3f\n",valor);
- wait_ms(100);
-
+ //pc.printf("\r\t%1.3f\n",valor);
+ wait_ms(1);
}
}
+
}
void serra()
{
- for(int i = 0; i<=15; i++) {
- Bus = i;
+ for(int i = 0; i<8; i++) {
+ Bus = i*7;
valor = 3.3*Ain.read();
//pc.printf("\r\t%1.3f\n",valor);
wait_ms(100);
@@ -61,7 +61,7 @@
Bus = (i/10)*15;
wait_ms(100);
valor = 3.3*Ain.read();
- // pc.printf("\r\t%1.3f\n",valor);
+ //pc.printf("\r\t%1.3f\n",valor);
}
@@ -110,8 +110,9 @@
case 4:
- for (int i=30; i<40; i++) {
+ for (int i=30; i<35; i++) {
contador = 0;
+ j =0;
}
break;
@@ -121,7 +122,7 @@
int main()
{
- button.fall(&wave);
+ button.rise(&wave);
}
\ No newline at end of file