![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Código que gera a onda senoidal
Dependencies: mbed SeeedShieldBot BluetoothSerial
Revision 2:447e428e7d97, committed 2021-05-31
- Comitter:
- pedrohmo22
- Date:
- Mon May 31 18:04:11 2021 +0000
- Parent:
- 1:3caba2fe325c
- Commit message:
- codigo_comentarios
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon May 31 17:59:45 2021 +0000 +++ b/main.cpp Mon May 31 18:04:11 2021 +0000 @@ -13,7 +13,7 @@ for (int i = 0; i < 360; i++) { //For da onda senoidal valor = ((sin(i * 180/3.14159265359) + 1) * 16) / 2; //Conta que vai para a saída digital saida = valor; //Saída digital de 4-bit - leitura_float=analogico.read(); //Leitura da entrada analógica + leitura_float=leitura.read(); //Leitura da entrada analógica pc.printf("\r%f\n", leitura_float); wait(0.01); }