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.
Diff: conversor.cpp
- Revision:
- 10:fef73855847f
- Parent:
- 9:c9fd0beba38c
- Child:
- 12:415818832707
--- a/conversor.cpp Mon Jun 08 16:27:29 2020 +0000 +++ b/conversor.cpp Mon Jun 08 20:07:08 2020 +0000 @@ -8,6 +8,9 @@ float valor; int estado_botao; +int senoide[8] = {0,1,4,6,7,6,4,1}; +float vref = 3.3; + int SEQUENCIA[8]={ 0b000, 0b001, @@ -72,7 +75,14 @@ pc.printf("\r\t%1.3f\n",valor); } } - + else if(estado_botao == 3){ + for(int i; i<8;i++){ + saida_digital = senoide[i]; + valor = leitura_an.read()*vref; + pc.printf("\r\t%1.3f\n",valor); + wait(0.5); + } + } } } \ No newline at end of file