Hello,
I seems simple but i can't get it work...
Need little help , setup is for RX =(UNO+HC12 +LCD Keypad Shield) and for TX (Nano+HC12).. i tested all separately for communication on pc screen with serial print ..to see all items are running.
but i can not fix how i can let the Nano send (Intruder detected) to the UNO so the uno print part on the LCD (intruder detected) .. send is simple but receiving part is problem to let run the lcd part when receiving data from TX
if separately i can print it on the uno+lcd , but i need some help (Please) how to put the RX part together with my LCD print part in 1 sketch for the UNO when he receives the text (Intruder detected) from the nano+hc12.
Here is Code on nano Tx ( now with "serial print" , Just need >> to start the text on UNO when Nano send data , don't know what code to use herefore instead of serial.print now ?
How you mean ... The Transmitting part is on nano+hc12... This code is also needed in the Receiver (Uno) but i dont know how to write the correct code to make it 1 sketch together with LCD part on the Receiver.... and on Transmitter i need part that sends correct command line to the Receiver for startup the lcd text
Your two sketches simply show you that you can send a message to a display.
The following "mashup" of your two sketches (for which you asked) creates nothing to cause an alarm or listen for an alarm. It just says "alarm" forever.
// TX part simple code on Nano+HC12
#include <SoftwareSerial.h>
SoftwareSerial HC12(10, 11);//tx,rx
// Code on Uno+Hc12 for print on LCD
#include <LiquidCrystal.h>
#include <LCDKeypad.h>
LCDKeypad lcd;
void setup() {
Serial.begin(9600);
lcd.begin(16, 2);
lcd.clear();
lcd.blink();
lcd.print("Intruder Alarm"); // Print message on LCD.
lcd.setCursor(0, 1); //first possition on line 2
lcd.print("Sector: ");
}
void loop() {
Serial.print("Intruder Alarm");
delay(2000);
}
Continue reading the web site where you copied parts of the code...
The plan is , 1 extern pir start up the Nano+HC12 TX , then this sends his message to the UNO+HC12 (RX) and displays "intruder alarm" but i got stuck in the code to move on with the project ..
because i'm a very beginner i struggle a lot and thank you fot the help
i know that each TX and RX need same code to send and receive.. but because the Receiver needs also to print his message on the LCD i could not find the correct way to bring those 2 sketches in 1 sketch for the receiver part .
Start with a picture of how you think it should look... make your own pencil drawing and post it here. Add the PIR... (author's original drawing from above link)
So what is your plan to solve the problem? Are you intended to learn programming or to look for somebody, who program for you?
In the first case start from sending and receiving messages between boards, as described in many tutorials in the net, i.e in post #4/
In the second case please ask to moderators to move your question to the Paid Consultancy section.
hello,
1.. I want to learn how to program but therefore i analyzed some parts left and right out of working sketches i looked up online , i tested the connection already between boards and HC12 with simple sketches
to see if they are really working with serial prints on pc screen and what that communication does. But i could not figure out how to print my message on LCD after receive a signal form TX side instead of print on PC screen..
2.. my plan to solve the problem is , i look up more sketches online and copy parts in my arduino IDE and try to analyze what they do.. but there i struggle a lot because i'm new to this .. and i don't know yet every command that can be put together..
the given sketch example (fxpd) is working on uno+Lcd screen (my RX side),
this is my setup idea >> when all is working
but i can't find the good code for sending out (1 simple signal) from TX side >> that activates the code on the RX side that will print my text on LCD
i tried some sending sketches and they al work in serial pc screen and the LCD flikkers lightly when Tx light goes on and out
but not my text appears..
i go analyze and test some more sketches .. Thx for the responses