简体   繁体   English

如何将 Expo 与 arduino 连接

[英]How to connect Expo with arduino

I want to connect my apps with Arduino which can control the switch through the apps.我想将我的应用程序与 Arduino 连接,它可以通过应用程序控制开关。

However, I found out that expo does not support Bluetooth and I'm trying to use another way by communicating through the serial port which also unsuccessful also because Expo does not support it.但是,我发现 expo 不支持蓝牙,我正在尝试通过串行端口通信来使用另一种方式,这也是因为 Expo 不支持它。

Are there any other ways to connect Expo projects with Arduino?还有其他方法可以将 Expo 项目与 Arduino 连接起来吗?

It is not possible for 2 reasons:不可能有两个原因:

  • Arduino doesn't have BT Arduino 没有BT
  • Expo is a multi platform mobile SDK. Expo是一款多平台手机SDK。 But since iOS has a bad and incomplete BT implementation, Expo will probably not implement it.但是由于 iOS 的 BT 实现不好且不完整,Expo 可能不会实现它。

You can add a BT module to your Arduino like HC-05 or HM-10.您可以将 BT 模块添加到 Arduino,如 HC-05 或 HM-10。 (use HM-10 if you want to connect it with iOS, since iOS is not able to transmit data over the standard SPP - Serial Protocol Profile). (如果您想将 HM-10 与 iOS 连接,请使用 HM-10,因为 iOS 无法通过标准 SPP - 串行协议配置文件传输数据)。

There are some apps on the store to connect a HM-10 devices and switch on/off something: https://play.google.com/store/apps/details?id=com.argonremote.bluetoothcontroller商店中有一些应用程序可以连接 HM-10 设备并打开/关闭某些东西: https://play.google.com/store/apps/details?id=com.argonremote.bluetoothcontroller

Or you can use an ESP32 instead of an Arduino.或者您可以使用 ESP32 代替 Arduino。 So you will be able to connect it over WiFi or BT.因此,您将能够通过 WiFi 或 BT 连接它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM