imposta un modulo radio TEA5767
Dependencies: mbed
Diff: main.cpp
- Revision:
- 1:84d896b9240b
- Parent:
- 0:7b9184b3ceba
- Child:
- 2:6b09752bd3b2
--- a/main.cpp Wed Oct 26 14:59:17 2016 +0000 +++ b/main.cpp Thu Oct 27 08:53:19 2016 +0000 @@ -8,25 +8,30 @@ const int addr = 0xC0; -char config_t[6]; -char read_t[6]; +char config_t[5]; +char search[5]; + -void prevfreq(){ - //config_t[2]=0x50; - radio.write(addr, config_t, 5); - //config_t[2]=0xD0; +void seqfreq(){ + search[0] = 0x6F; + search[1] = 0xCA; + search[2] = 0xB0; + search[3] = 0x12; + search[4] = 0x00; + radio.write(addr, search, 5); + } int main() { -//config_t[0] = 0xC0; -config_t[0] = 0x40; -config_t[1] = 0x00; // config data byte2 -config_t[2] = 0xD0; -config_t[3] = 0x01; + +config_t[0] = 0x2F; +config_t[1] = 0xCA; // config data byte2 +config_t[2] = 0x10; +config_t[3] = 0x12; config_t[4] = 0x00; -//radio.write(addr, config_t, 5); -button.rise(&prevfreq); +radio.write(addr, config_t, 5); +button.rise(&seqfreq); }