6.6 Testing the Delivery Sketch
Install and run the sketch on the Arduino, open the
Arduino IDE serial window, and pinch the force sensitive resistor
between your thumb and forefinger. A delivery detection should
register on the serial window. Release the force sensitive resistor
and wait a few seconds. The serial window should report a value
less than 400, followed by an Empty
alert. If you don’t see these messages, check your sensor wiring.
You may also need to increase or decrease the force_sensor_value
threshold value condition to
address any jitter or unexpected fluctuations in the analog
readings of the sensor.
Next, make sure that the XBee radios are connected
and communicating with each other. Use the screen
command that was mentioned in
Chapter 5, Tweeting Bird
Feeder, to observe the inbound messages from the force
sensitive resistor when it is squeezed. The information being
transmitted should be the same as what is being displayed in the
Arduino IDE serial window. Once everything checks out, we can write
a Python script that will listen for inbound XBee messages via the
FTDI cable created--serial port and act on them accordingly.