Programski_zadatak_23
Dependencies: Display1602 mbed nRF24L01P
Revision 3:77408dbd520c, committed 2016-01-23
- Comitter:
- DorijanMacek
- Date:
- Sat Jan 23 21:48:52 2016 +0000
- Parent:
- 2:698c8f9140e6
- Commit message:
- Sve radi, neure?en kod
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| nRF24L01P.lib | Show annotated file Show diff for this revision Revisions of this file |
--- 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);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nRF24L01P.lib Sat Jan 23 21:48:52 2016 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/Owen/code/nRF24L01P/#8ae48233b4e4