This is the beginnings of an Arduino sketch for prototypes of a device that
measures the diameter of a tree. It is written to be able to support multiple
sensors and transmitting devices via compile-time configuration in
src/dendrometer/config.h
.
receiver_test
and transmitter_test
(in the src/
folder) are Arduino
sketches to test the functionality of the VirtualWire
library. These sketches
are confirmed to work when pin 12 of one Arduino transmitting data is directly
connected to pin 11 of an Arduino receiving data, set up like in the following
schematic.
The test Arduino sketches also work with real RF (radio) modules. In particular, the sketches were tested with HiLetgo 315Mhz RF transmitter and receiver modules. The following schematic shows how a circuit using these modules and the test sketches could be set up.
Upload the receiver_test
sketch to the Arduino that will receive data from the
other Arduino. Upload the transmitter_test
sketch to the other Arduino.
When both Arduinos have power, the receiving Arduino should repeatedly output the following through the serial port (i.e. USB if connected to a computer).
Received: hello there!
It seems that there are many more easily found internet resources on VirtualWire than there are on its replacement, RadioHead. Based on RadioHead's list of supported chips, it's unclear whether it even supports the hardware we're using!