Hi , my project is to send Tmp and humidity from DHT11 to labview with this
DHT11==> arduino mega ===> nrf24l01 (mirf) nrf24l01==> arduino uno ==> labview
my problem is when i get resultat on serial moniteur (arduino uno) i get this in attached
my codes is
serveur
#include <SPI.h>
#include <Mirf.h>
#include <nRF24L01.h>
#include <MirfHardwareSpiDriver.h>
void setup(){
Serial.begin(9600);
Mirf.spi = &MirfHardwareSpi;
Mirf.init();
Mirf.setTADDR((byte *)"clie1");
Mirf.payload = 32;
Mirf.config();
Serial.println("Listening ..."); // or "Listening ..." on sever
}
void loop(){
int a[32];
if(!Mirf.isSending()&& Mirf.dataReady()){
Serial.println("Got packet");
Mirf.getData((byte *)a);
Serial.print("Humidity :");
Serial.print(a[0]);
Serial.println();
Serial.print("Temperature :");
Serial.print(a[1]);
Serial.println();
}
}
client
#include <SPI.h>
#include <Mirf.h>
#include <nRF24L01.h>
#include <MirfHardwareSpiDriver.h>
#include "DHT.h"
#define DHTTYPE DHT11
#define DHTPIN 2
DHT dht(DHTPIN, DHTTYPE);
void setup(){
Serial.begin(9600);
dht.begin();
Mirf.spi = &MirfHardwareSpi;
Mirf.init();
Mirf.setTADDR((byte *)"serv1");
Mirf.payload = 32;
Mirf.config();
Serial.println("Beginning ... ");
}
void loop(){
int h = dht.readHumidity();
int t = dht.readTemperature();
int a[2] = {h, t};
Mirf.send((byte *) a);
delay(500);
}
Plz i have this problems help me
