问题描述
假设我正在尝试制作一个类似于 YouTube 视频中的聊天程序 XBee Basics- 第 2 课 - AT 模式下两个 XBees 之间的简单聊天程序.
Let's say I am trying to make a chat program like in the YouTube video XBee Basics - Lesson 2 - Simple Chat Program Between Two XBees in AT Mode.
在这个视频中,他解释说一个 XBee 是一个发送器,它使用 Arduino 向另一个 XBee 发送Hello world".
In this video, he explained that one XBee is a sender which sends "Hello world" to the another XBee using Arduino.
但是,XBee 可以同时发送和接收数据吗?路由器是否能够与协调器通信,反之亦然?
However, is the XBee able to send and receive data at the same time? Are the routers able to communicate to the coordinator and the other way around?
此外,我想编写自己的软件来接收和发送数据,而不是使用 Arduino 软件.是否有任何库和 API?
Additionally, I want to write my own software to receive and send data and not using Arduino software. Are there any libraries and APIs?
文章或视频会很好.
推荐答案
是的,可以同时发送和接收数据.当 XBee 模块配置为AT 模式"(也称为透明串行")时,您可以配置 DH 和 DL 参数来识别将接收串行数据的目标节点.
Yes, it is possible to send and receive data at the same time. When XBee modules are configured in "AT mode" (also referred to as "Transparent Serial"), you configure the DH and DL parameters to identify the destination node that will receive the serial data.
您绝对应该花一些时间在 examples.digi.com 上获取有关设置的分步教程提供各种示例,例如双向聊天.快速参考页面包括各种语言的库的长列表,包括Digi XBee ANSI C 库 用于 C 和 xbee-api 用于 Java.
You should definitely spend some time at examples.digi.com for step-by-step tutorials on setting up various examples like a two way chat. The Quick Reference page includes a long list of libraries in various languages, including the Digi XBee ANSI C Library for C and xbee-api for Java.
这篇关于XBee 双向通信(发送方和接收方)同时进行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!