Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bluetooth Bluegiga蓝牙低能耗:通过Arduino UART读取数据_Bluetooth_Arduino_Bluetooth Lowenergy_Uart_Bluegiga - Fatal编程技术网

Bluetooth Bluegiga蓝牙低能耗:通过Arduino UART读取数据

Bluetooth Bluegiga蓝牙低能耗:通过Arduino UART读取数据,bluetooth,arduino,bluetooth-lowenergy,uart,bluegiga,Bluetooth,Arduino,Bluetooth Lowenergy,Uart,Bluegiga,我需要在两个BLE设备之间进行通信——一个作为发送器,另一个作为收集器。我正在使用 Bluegiga有一个向发送方和接收方闪烁的示例代码,我遵循了这个示例代码。现在的问题是,我如何确保这两个BLE之间的数据通信是否正常工作 如果您查看Bluegiga文章,您将在说明5中看到将UART设备连接到UART1/Alt1引脚,以查看过程所有阶段的UART状态输出。这意味着将Bluegiga RX连接到Arduino TX,反之亦然 通过多封Bluegiga支持电子邮件,我确保我正在连接 正确的别针。 确

我需要在两个BLE设备之间进行通信——一个作为发送器,另一个作为收集器。我正在使用

Bluegiga有一个向发送方和接收方闪烁的示例代码,我遵循了这个示例代码。现在的问题是,我如何确保这两个BLE之间的数据通信是否正常工作

如果您查看Bluegiga文章,您将在说明5中看到将UART设备连接到UART1/Alt1引脚,以查看过程所有阶段的UART状态输出。这意味着将Bluegiga RX连接到Arduino TX,反之亦然

通过多封Bluegiga支持电子邮件,我确保我正在连接 正确的别针。 确保BLEs获得3.3V电源 在Arduino中使用以下代码读取UART,但串行监视器中未显示任何内容。 编辑:我注意到Arduino TX、RX引脚没有闪烁。这意味着Arduino没有从Bluegiga收到任何UART pin

我错过了什么

int incomingByte = 0;   // for incoming serial data

void setup () {
    Serial.begin(115200); }

void loop() {

    // send data only when you receive data:
    if (Serial.available() > 0) {
            // read the incoming byte:
            incomingByte = Serial.read();

            // say what you got:
            Serial.print("I received: ");
            Serial.println(incomingByte, DEC);
    }
}

已解决:BLE接收器端出现问题。它不是重复的,该线程没有解决问题。