Esempio n. 1
0
        public void PingServos()
        {
            CommBuffer buffer = comm.outputBuffer;

            buffer.Write(0xFF);
            buffer.Write(0x09);
            buffer.Write(0x03);
            buffer.Write(0x08);
            buffer.Write(0x00);

            comm.SendMessage();
        }
Esempio n. 2
0
 public SerialComm(Robot r, string portName)
 {
     this.r                   = r;
     this.port                = new SerialPort(portName);
     this.port.BaudRate       = 115200;
     this.port.DataBits       = 8;
     this.port.ReadBufferSize = 512;
     this.port.StopBits       = StopBits.One;
     this.port.Parity         = Parity.None;
     this.port.Open();
     this.port.DataReceived += new SerialDataReceivedEventHandler(port_DataReceived);
     this.inputBuffer        = new CommBuffer();
     this.outputBuffer       = new CommBuffer();
 }
Esempio n. 3
0
        public void Ping()
        {
            CommBuffer buffer = comm.outputBuffer;

            /*buffer.Write(0xFF);
            *  buffer.Write(0x0A);
            *  buffer.Write(0x03);
            *  buffer.Write(0x08);
            *  buffer.Write(0x00);*/

            buffer.Write(0xFF);
            buffer.Write(0x14);
            buffer.Write(0x01);

            comm.SendMessage();
        }