Arduino Array Structure BLE WriteValue - Programming Questions
Maybe your like
Dear Community,
I have successfully hacked myself into a Furby with the Arduino Wifi Rev2 via Bluetooth BLE. I can connect to the Furby characteristics perfectly: https://github.com/Jeija/bluefluff . Now I need to send a byte array to the characteristic. Unfortunately the ArduinoBLE Libary does not give an example on how to do this.
I am trying to make the Furby beatbox, here is a list of all action commands. https://github.com/Jeija/bluefluff/blob/master/doc/actionlist.md
I tried to define the array like this :
byte furbyBeatBox[6] = {0x13,0x00,0x18,0x00,0x01,0x07};And write it to the characteristic like this:
simpleKeyCharacteristic.writeValue(furbyBeatBox,6);Unfortunately this does not work. I can successfully write this single byte command:
simpleKeyCharacteristic.writeValue((byte)0xdb);I will write a nice tutorial after I figured this out. Thanks for any help you guys can provide.
J-M-L April 11, 2022, 11:53pm 2how did you define simpleKeyCharacteristic?
cfscholz April 13, 2022, 6:19am 3Hi J-M-L, simpleKeyCharacteristic is defined as:
BLECharacteristic simpleKeyCharacteristic = peripheral.characteristic("dab91383-b5a1-e29c-b041-bcd562613bde");and peripheral as:
BLEDevice peripheral = BLE.available();It would be amazing if someone can enlighten me how to send this Byte Array via writeValue.
Thanks for any help.
J-M-L April 13, 2022, 5:05pm 4use this constructor
BLECharacteristic(const char* uuid, uint8_t properties, int valueSize, bool fixedLength = false);and you can pass the value size (number of bytes) you want to allocate
system Closed October 10, 2022, 5:05pm 5This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
Related topics
| Topic | Replies | Views | Activity |
|---|---|---|---|
| Using BLECharacteristic.writeValue() for byte arrays Programming | 4 | 10815 | May 6, 2021 |
| Envío de String mediante Librería Arduino BLE (SOLUCIONADO) Software | 8 | 1997 | May 7, 2021 |
| ESP32 BLE Peripheral - how to set long characteristic value? Programming | 2 | 1334 | May 22, 2023 |
| BLE writevalue help Programming | 20 | 714 | November 11, 2024 |
| BLE characteristic syntax question Programming | 4 | 546 | May 14, 2022 |
Tag » Arduino Ble Send Byte Array
-
Using BLECharacteristic.writeValue() For Byte Arrays - Arduino Forum
-
Sending Byte Array From Arduino Nano 33 Ble Sense To Mobile App
-
How To Send Data Via BLE? - Nano 33 BLE - Arduino Forum
-
Sending An Array Of Sensor Data Nano 33 BLE To IOS Application
-
Arduino Nan BLE 33 - How To Send Data
-
Constructing A Complex Value For BleCharacteristic.writeValue
-
Integer To Byte Array Arduino BLE - C++ - Stack Overflow
-
Sending Array Of Bytes To Lamp Via BLE - ESP32 Forum
-
Issues With BLE Read/write Byte Array Blocks - Thunkable Community
-
Why Does BLE Receive String Work, And BLE Receive Byte Array ...
-
[Arduino] Read BLE Byte Array On Arduino 101 - Qiita
-
Arduino BLE Programming - Giovanni Organtini - Medium
-
Wrong Bytes Received On Windows · Issue #885 · Hbldh/bleak - GitHub
-
Max Bluetooth And Bytes Cast Testing - MaxMSP Forum | Cycling '74