用蓝牙让arduino板子向电脑发送肌电传感器信号,电脑接收端没有反应。电脑为window7,外接蓝牙适配器。把电脑换成MAC,可以传输成功,把数据传输到手机也可以成功。下面是代码:
// reads analog input from the five inputs from your arduino board
// and sends it out via serial
// variables for input pins and
int analogInput = A0;
// variable to store the value
int value = 0;
void setup()
{
// declaration of pin modes
pinMode(analogInput, INPUT);
// begin sending over serial port
Serial.begin(9600);
}
void loop()
{
// read the value on analog input
value = analogRead(analogInput);
// print out value over the serial port
{
Serial.println(value);
}
// wait for a bit to not overload the port
delay(20);
}
代码很简单。下图1是串口软件接arduino的usb接口,可以输出数据,图2是接蓝牙的COM10端口,无数据显示。


各位大神,谁来帮我解答一下,arduino菜鸟,什么都不懂的那种!关键是同样的设定,可以在mac和手机上接收
// reads analog input from the five inputs from your arduino board
// and sends it out via serial
// variables for input pins and
int analogInput = A0;
// variable to store the value
int value = 0;
void setup()
{
// declaration of pin modes
pinMode(analogInput, INPUT);
// begin sending over serial port
Serial.begin(9600);
}
void loop()
{
// read the value on analog input
value = analogRead(analogInput);
// print out value over the serial port
{
Serial.println(value);
}
// wait for a bit to not overload the port
delay(20);
}
代码很简单。下图1是串口软件接arduino的usb接口,可以输出数据,图2是接蓝牙的COM10端口,无数据显示。


各位大神,谁来帮我解答一下,arduino菜鸟,什么都不懂的那种!关键是同样的设定,可以在mac和手机上接收
