Analog Communication (xbee.h) with mbed Application Board and Xbee
Items Needed:
- 2 Xbees configured for comms. If you need to configure them see this tutorial: Xbee Basic Setup
- 2 mbed Application Boards
- CoolTerm Terminal (or equivalent terminal ability): Download Home Page (Windows 64-bit link)
Steps:
- 1 Set Xbee radios into designated spot on mbed Application Boards and plug into computer:
- Verify that the computer recognized the boards by checking the Computer section of your file browser for Devices with removable Storage. They will be named generically for the appBoard, I recommend you change their names based on their corresponding Xbee's configuration. I will be following the assumption that they are correctly named for the remainder of the tutorial.
- Download the following code onto the End Device appBoard:
Import programpotSend
Analog comms with xbee. Program for the End Device.
- Download the following code onto the Coordinator appBoard:
Import programpotGet
Analog comms with xbee. Program for the Coordinator.
- You can now control the analog values displayed on the Coordinator with the potentiometer from the End Device's appBoard. Data will be displayed on LCD screen as well is in terminals. See CoolTerm Communication with Xbees for a tutorial on how to open terminals and connect if you are unfamiliar.
- As you change the value of Pot1 on the End Device the red value on the Coordinators rgb light will vary accordingly. Pot2 will adjust the blue value in the same fashion.
Please log in to post comments.