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:
- 13:495cb8a5ca7d
- Parent:
- 12:415818832707
- Child:
- 14:c12150a053fd
--- a/conversor.cpp Wed Jun 10 20:30:28 2020 +0000 +++ b/conversor.cpp Wed Jun 10 20:33:20 2020 +0000 @@ -8,15 +8,11 @@ Serial pc(USBTX, USBRX); float valor; int estado_botao; -<<<<<<< working copy float tempo = 0.5; //array de valores que será enviado para os pinos "saida digital" -======= - int senoide[8] = {0,1,4,6,7,6,4,1}; float vref = 3.3; ->>>>>>> merge rev int SEQUENCIA[8]={ 0b000, 0b001, @@ -81,28 +77,8 @@ pc.printf("\r\t%1.3f\n",valor); } } -<<<<<<< working copy //Onda senoidal else if (estado_botao == 3){//teste do valor da variável estado_botao para determinar qual onda será a saída do gerador - for (int i=0; i<8; i++) { - saida_digital = SEQUENCIA[i]; - wait(tempo); - valor=leitura_an.read(); - pc.printf("\r\t%1.3f\n",valor); - } - for (int i=7; i>0; i--) { - saida_digital = SEQUENCIA[i]; - wait(tempo); - valor=leitura_an.read(); - pc.printf("\r\t%1.3f\n",valor); - } - } - - - }//fim do while(1) -}//fim do int main() -======= - else if(estado_botao == 3){ for(int i; i<8;i++){ saida_digital = senoide[i]; valor = leitura_an.read()*vref; @@ -110,7 +86,5 @@ wait(0.5); } } - } -} ->>>>>>> merge rev - \ No newline at end of file + }//fim do while(1) +}//fim do int main() \ No newline at end of file