@will I checked. The OP so far has not shown us the logs ideally side by side. I don't know what OS he is using and TBH forget howto do it, but to properly test he needs to run two IDE processes at the same time in order to see the interplay of debug messages.
OR have two computers (or VM's)
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@will He did not test with Bill's code to my knowledge. He has added some buttons in order to send different msgs and had ChatGPT do something to the sketches. I just did a read over comparing Bills sketches and his and they appear correct but are strong contenders for most horribly written sketch of the year.
Working is 1/10. So far it isn't a 1.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@will He promised a wiring diagram, the photos are useless. It could be a wiring error, poor breadboard contact, using the 9V battery rather than a wall wart or USB power.
Very frustrating.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
All possibly complicated by differing (spoken) languages as well.
Anything seems possible when you don't know what you're talking about.
@will Possibly but I carried on a long running conversation with a dutch fellow by using google translate. It hasn't been a problem for me yet.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
As Ron (@zander) has pointed out, there could be a wiring error, etc., so we are all shooting in the dark. Also with projects containing a transmitter and receiver, either or both may be failing, so it is more difficult to identify the problem. Hence, always start with the simplest system possible ... before adding switches, untested code, etc.
---------------------
I notice in the receive code you posted:
// Set buffer to size of expected message uint8_t buf[1];
and
// Message received with valid checksum Serial.print("Message Received: "); Serial.println((char*)buf);
println expects a byte containing '0' at the end of the string, but with a buf of length just 1 byte, there is no space allocated for the '0'.
This may or may not be your problem, but it looks like a classic programming mistake, that rarely ends well.
---------------
I am sorry, but I don't have Arduino Nanos or the transmitter/receiver modules, so I can't test anything or offer much direct help, but as the benevolent forum host Bill (@dronebot-workshop) always carefully checks his tutorials, can I suggest that you try to replicate his tutorial, albeit using Nanos instead of Unos, and report back, as Ron has suggested.
Tutorial at https://dronebotworkshop.com/433mhz-rf-modules-arduino/
Good luck with your project, and best wishes, Dave
@davee He is a student, according to his About Me he has completed this project and several others. Please do not help this cheater.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
Serial log for the receiver
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\VIVOBOOK\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM4
Using Programmer : arduino
Overriding Baud Rate : 115200
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 4.4
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\VIVOBOOK\AppData\Local\Temp\arduino_build_889095/ask_ricevente.ino.hex"
avrdude: writing flash (7014 bytes):
Writing | ################################################## | 100% 2.63s
avrdude: 7014 bytes of flash written
avrdude: verifying flash memory against C:\Users\VIVOBOOK\AppData\Local\Temp\arduino_build_889095/ask_ricevente.ino.hex:
avrdude: load data flash data from input file C:\Users\VIVOBOOK\AppData\Local\Temp\arduino_build_889095/ask_ricevente.ino.hex:
avrdude: input file C:\Users\VIVOBOOK\AppData\Local\Temp\arduino_build_889095/ask_ricevente.ino.hex contains 7014 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 2.36s
avrdude: verifying ...
avrdude: 7014 bytes of flash verified
avrdude done. Thank you.
Serial log for the transmitter
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\VIVOBOOK\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM3
Using Programmer : arduino
Overriding Baud Rate : 115200
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 4.4
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\VIVOBOOK\AppData\Local\Temp\arduino_build_893658/teleRC-testRadioPulsanti.ino.hex"
avrdude: writing flash (7060 bytes):
Writing | ################################################## | 100% 2.68s
avrdude: 7060 bytes of flash written
avrdude: verifying flash memory against C:\Users\VIVOBOOK\AppData\Local\Temp\arduino_build_893658/teleRC-testRadioPulsanti.ino.hex:
avrdude: load data flash data from input file C:\Users\VIVOBOOK\AppData\Local\Temp\arduino_build_893658/teleRC-testRadioPulsanti.ino.hex:
avrdude: input file C:\Users\VIVOBOOK\AppData\Local\Temp\arduino_build_893658/teleRC-testRadioPulsanti.ino.hex contains 7060 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 2.40s
avrdude: verifying ...
avrdude: 7060 bytes of flash verified
avrdude done. Thank you.
@valerio WE don't do homework here, besides according to your About Me you already did it.
My projects so far include two IR-controlled mini cars (at the moment disassembled), a simple robot arm (that I'll disassemble soon) an ultrasonic range measurer (on top of the sensor and board it includes a laser pointer, a stepper with a pointer that is spun over a graduated scale and indicator leds to tell how many times the stepper turned), a resistance/voltage measurer (basically an arduino, two voltage dividers and a display) and a more complex arm with a gripper (it's work in progress at the moment).
And neither of your sketches got anywhere. GOODBYE!
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.