ทำได้แล้วครับ แต่ถ้าอยากให้ตัวรับแสดงข้อมูลใน lcd ต้องเขียนอะไรเพิ่มข้างอะคับแนะนำกันหน่อย ขอบคุณครับ
โค๊ดตัวรับผมครับ
#include <SPI.h>
#include <nRF24L01p.h>
#include <LiquidCrystal.h>
nRF24L01p receiver(2,7);//CSN,CE
LiquidCrystal lcd(10, 9, 3, 4, 5, 6);
void setup(){
delay(1000);
lcd.begin(16, 2);
Serial.begin(115200);//Initializing Serial communication Arduino<====>PC
SPI.begin();// Initializing SPI
SPI.setBitOrder(MSBFIRST);// set the transmission as MSB First
receiver.channel(90);
receiver.RXaddress("Artur");
receiver.init();// Initializing receiver
}
String message;
void loop(){
if
//lcd.println("Failed to read from message");
(receiver.available()){ //if message is available
receiver.read();// read received message
receiver.rxPL(message);// process the received information
Serial.println(message);// display the message
message=""; // reset message String
}
}
ลองดูบทความ LCD นี้ประกอบครับ น่าจะทำได้ด้วยความรวดเร็ว http://www.arduinoall.com/article/20