Sending Data From Unity to Arduino Using Bluetooth
All I want to do is send the number 55 to the Arduino board using Bluetooth. The Unity build recognizes the Bluetooth device and is connected. At the end of the game, when a winner UI appears on the screen, the code below should send the data to the Arduino board. There is an error line under the 55 saying:
ERROR: Cannot initialize type 'byte' with a collection initializer because it does not implement 'System.Collections.IEnumerable'
byte[] msg = new byte() { 55 };
BTdevice.send(msg);
Comment
Your answer
Follow this Question
Related Questions
Read Arduino Sensors using bluetooth in Unity 0 Answers
Arduino Unity bluetooth 0 Answers
Unity iOS send bluetooth data to Arduino (Plugin?) 0 Answers