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.
Fork of ProgettoAUC by
Revision 5:a38af5651374, committed 2016-12-04
- Comitter:
- Alessio359
- Date:
- Sun Dec 04 09:54:36 2016 +0000
- Parent:
- 4:98e062cf962e
- Child:
- 6:d333346124aa
- Commit message:
- aa
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Nov 28 15:44:32 2016 +0000 +++ b/main.cpp Sun Dec 04 09:54:36 2016 +0000 @@ -10,17 +10,16 @@ Serial pc(USBTX, USBRX); //tx, rx InterruptIn button (USER_BUTTON); + char s; float frequenza; unsigned int N,m1,m2; +char config_t[5]; +char lettura[5]; const int addr = 0xC0; //address for writing data, reading is C1 -char config_t[5]; -char search[5]; -char lettura[5]; - - +//char search[5]; /*void seqfreq() //search next frequency, minimun signal strength { search[0] = 0x6F; @@ -34,8 +33,6 @@ for(int i=0;i<2;i++){ s=lettura[i]& 0x3F; - - }*/ @@ -51,7 +48,7 @@ //a questo punto dobbiamo converitre in esadecimale N ed inviarlo al modulo radio // usando unsigned int n sappiamo con sicurezza di utilizzare solo 2 byte m2=N & 0x00FF;//isoliamo il secondo byte di N - m1=N& 0xFF00;//isoliamo il primo byte di N,dobbiamo però shifarlo + m1=N & 0xFF00;//isoliamo il primo byte di N,dobbiamo però shifarlo m1=m1>>8; config_t[0] = char(m1); @@ -61,10 +58,11 @@ config_t[4] = 0x00; radio.write(addr, config_t, 5); - lcd.locate(0,0); - lcd.printf("Frequenza:" ,frequenza); - wait(1); + lcd.locate(4,0); + lcd.printf("Frequenza: " ,frequenza); + lcd.printf(" MHz "); + wait(0.5); } - // button.rise(&seqfreq); + }