[OSC]
Communicate with XBee modules with the Make Controller Kit via OSC. More...
Devices
There can only be one XBee board connected to the Make Controller Kit's serial port at a time, so there is not a device index in XBee OSC messages.Properties
The XBee system has the following properties:- autosend
- io16
- io64
- rx16
- rx64
- tx16
- tx64
- tx-status
- active
- Autosend
- The autosend property corresponds to whether the Make Controller will automatically send out messages it receives from a connected XBee module. By default, this is turned off. To turn this on, send the message
and to turn it off, send
/xbee/autosend 1
All autosend messages send at the same interval. You can set this interval, in milliseconds, by sending the message/xbee/autosend 0
so that messages will be sent every 10 milliseconds. This can be anywhere from 1 to 5000 milliseconds./system/autosend-interval 10
- You also need to select whether the board should send to you over USB or Ethernet. Send
to send via USB, and
/system/autosend-usb 1
to send via Ethernet. Via Ethernet, the board will send messages to the last address it received a message from./system/autosend-udp 1
- io16
- The io16 property corresponds to an incoming message from an XBee module with samples from its IO pins. The best way to use this is to turn the XBee system's autosend property on - then the Make Controller can relay io16 messages as soon as they're received.
- Once you've turned on autosend, if there are boards on your network that are sending IO packets, you'll receive messages like
The first two numbers are:
/xbee/io16 1234 28 12 0 0 1023 1023 0 512 0 1023
- the address of the module that sent the message (1234 in the example above)
- signal strength (28 above)
- The next 9 numbers are the values from the 9 IO pins on the XBee module.
- io64
- The io64 property corresponds to an incoming message from an XBee module with samples from its IO pins. This message is just like the io16 message, except it's coming from a board with a 64-bit address, rather than a 16-bit address. The structure of the message is the same (see above).
- rx16
- The rx16 property corresponds to an incoming message from a 16-bit address XBee module with arbitrary data. The best way to use this is to turn the XBee system's autosend property on - then the Make Controller can relay rx16 messages as soon as they're received.
- Once you've turned on autosend, if there are boards on your network that are sending IO packets, you'll receive messages like
The first three numbers are:
/xbee/rx16 1234 28 0 [43 44 45 32 46 47 48]
- the address of the module that sent the message (1234 in the example above)
- signal strength (28 above)
- the options byte (0 above), respectively.
- Following those is an OSC blob with the data (enclosed in square brackets above). These are the hex values for each byte of data.
- rx64
- The rx64 property corresponds to an incoming message from an XBee module with samples from its IO pins. This message is just like the io16 message, except it's coming from a board with a 64-bit address, rather than a 16-bit address. The structure of the message is the same (see above).
- Transmit Status
- The tx-status property gives you the status of a previously sent message. It tells you the frameID of the message that was sent and its status, which can be one of:
- Success. Message was successfully transmitted and received.
- No acknowledgement received. The message was successfully sent, but not successfully received on the other end.
- CCA Failure.
- Purged.
- If you don't include a frameID for the message that you sent, a tx-status message will not be generated. An example tx-status message will look like
where 52 is the frameID and "Success" is the status.
/xbee/tx-status 52 Success
- Active
- The active property corresponds to the active state of the XBee system. If you're not seeing appropriate responses to your messages to the XBee system, check whether it's active by sending the message
/xbee/active
- You can set the active flag by sending
/xbee/active 1
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Java 中堆内存和栈内存上的数据分布和特点
· 开发中对象命名的一点思考
· .NET Core内存结构体系(Windows环境)底层原理浅谈
· C# 深度学习:对抗生成网络(GAN)训练头像生成模型
· .NET 适配 HarmonyOS 进展
· 用 DeepSeek 给对象做个网站,她一定感动坏了
· DeepSeek+PageAssist实现本地大模型联网
· 手把手教你更优雅的享受 DeepSeek
· Java轻量级代码工程
· 从 14 秒到 1 秒:MySQL DDL 性能优化实战