如何在Windows phone 8.1中通过蓝牙连接发送字符
How to send a char through Bluetooth connection in Windows phone 8.1
去年我用Android和Arduino做了一个项目。我可以从arduino发送一些字符。
现在我想知道我怎么能在Windows Phone 8.1?
我发现了很多关于它的东西,但不是我真正想要的,我只是想创建一个简单的按钮,并向我的Arduino发送消息!
这里是我的代码从c++ Arduino:
const int ledVermelho = 7;
char entrada;
void setup() {
Serial.begin(9600);
pinMode(ledVermelho,OUTPUT);
}
void loop() {
entrada = Serial.read();
if (entrada == 'a') {
digitalWrite(ledVermelho,HIGH);
}
if (entrada == 'b') {
digitalWrite(ledVermelho,LOW);
}
}
使用https://processing.org/和他的附加库"G4P",您可以轻松创建按钮。
在此之后,您可以按照以下指南连接Arduino和Processing: https://learn.sparkfun.com/tutorials/connecting-arduino-to-processing .
至少,你可以使用processingJS为你的windows phone创建应用程序(只需在谷歌上搜索处理windows phone,你会发现很多指南)。
或者至少,你可以使用windows phone应用程序"BT Terminal"来相互连接。但也许,这看起来太不专业了。
相关文章:
- 当套接字连接断开时检测C/C++Unix
- 套接字连接"Operation not permitted"错误,甚至使用升压/平发器根.cpp
- C++套接字客户端到 Python 服务器未创建连接
- 在不知道套接字的情况下关闭网络连接
- 当对套接字 send() 的同步调用由于连接另一端丢失而被阻止时,如何恢复?
- 当客户端在 write() 期间终止连接时,由对等套接字错误重置连接
- 从网链套接字请求连接设备的列表
- C++ TCP 套接字通信 - 连接按预期工作,几秒钟后失败,没有收到新数据,read() 和 recv() 块
- 如何在 2 台主机之间保持 UDP 套接字连接打开
- 将"libpqxx"与Visual Studio 2013链接/安装,以便与PostgrSQL建立C++连接
- C++关闭套接字以启动新连接
- Opencv 不适用于套接字连接
- 使用单个套接字处理多个传入的 UDP 连接
- 连接UDP套接字,但仍然接收来自其他源的数据报
- C++通过套接字连接发送矢量
- 为什么我在蓝牙连接()上收到"java.io.IOException:读取失败,套接字可能关闭或超时,读取re
- boost1.62 在 docker 容器中重新连接后套接字损坏
- 尝试连接到 TCP 套接字 (Linux) 时连接被拒绝
- 仅通过建立一次TCP连接将Recv从客户端发送到服务器套接字
- 在已完成的std::线程连接上发生死锁