![](/media/cache/group/AET.jpg.50x50_q85.jpg)
Programski_zadatak_23
Dependencies: Display1602 mbed nRF24L01P
Diff: main.cpp
- Revision:
- 3:77408dbd520c
- Parent:
- 2:698c8f9140e6
--- a/main.cpp Sat Jan 23 20:12:32 2016 +0000 +++ b/main.cpp Sat Jan 23 21:48:52 2016 +0000 @@ -1,8 +1,9 @@ #include "mbed.h" +#include "nRF24L01P.h" #include "Display1602.h" -//#include "nRF24L01P.h" + I2C MSP430G(p9, p10); //sda, sc1 -//nRF24L01P odasiljac(p11,p12,p13,p14,p28,p27); +nRF24L01P odasiljac(p11,p12,p13,p14,p28,p27); //// mosi, miso, sck, csn, ce, irq //AnalogIn speed(p15); //AnalogIn direction(p26); Display1602 display(p19, p20, p21, p22, p23, p24,p25,p26,p29,p30,p18); @@ -29,9 +30,8 @@ while(1) { - wait(0.1); + t=readTempAndVoltage(0xC0,0x55,0x94,0);//55 - wait(0.1); v=readTempAndVoltage(0xC1,0xff,0x94,1);//55 //v=readTempAndVoltage(0xC1,0x55,0x94,1); @@ -56,7 +56,7 @@ { char config_t[2]; // transmitt buffer char value_read[2]; // read buffer - + wait(0.1); MSP430G.write(addr, config_t, 2); wait_us(20);