我想使用uint8數組從移動設備向Arduino發送超過藍牙的整數。 由於我使用的BLE模塊不接受Uint16Array,因此我僅限於使用Uint8數組。 我的應用代碼: var data = new Uint8Array(3);
data[0]= 1;
data[1]= 123;
data[2]= 555;
ble.writeWithoutResponse(app.connectedP
func readByte(bytes: [UInt8], offset: UInt8) -> UInt8 {
return bytes[offset] // Error: Cannot subscript a value of type '[UInt8]' with an index of type 'UInt8'
}
如果你改變了偏移到任何其他詮釋會導致同樣的錯誤。但是,如果我
我從YouTube視頻複製腳本,因爲沒有下載鏈接到腳本,但現在我總是收到相同的錯誤消息,而我不知道該怎麼辦。你可以幫幫我嗎? 這是我的代碼: #include <VirtualWire.h>
int ledPassive = 5;
int ledActive = 7;
int motor = 8;
void setup() {
// put you