/*__________________________________ * N X T BlueTooth BASIC MOVING * Ron Kessler * Created 6/1/2013 * __________________________________ * public sealed partial class MainPage : Page { private RfcommDeviceService rfcommservice; private StreamSocket socket; private DataWriter myWriter = null; //initial settings: forward at 75% Byte 4 = port # (01 = B, 02=C) Byte 5 = speed 0x32 = 50% forward 0xCF = 50% backwards 4B = 75% forward Byte[] LeftMotor = { 0x0C, 0x00, 0x80, 0x04, 0x02, 0x32, 0x05, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00 }; Byte[] RightMotor = { 0x0C, 0x00, 0x80, 0x04, 0x01, 0x32, 0x05, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00 }; #region Move Bot private async void SendCommand(Byte[] myCommand) { try { for (int x = 0; x < myCommand.Length; x++) { myWriter.WriteByte(myCommand[x]); } await myWriter.StoreAsync(); //now send it! } catch { } } #endregion