Example #1
0
        static void Main(string[] args)
        {
            // Create Instruction Object
            TurnInstruction ti = new TurnInstruction();

            // Populate Instruction
            ti.command   = command.reset;
            ti.rotation  = 0;
            ti.direction = 0;

            JObject o = new JObject(new JProperty("TurnInstruction", JObject.FromObject(ti)));


            Connect("169.254.0.2", JsonConvert.SerializeObject(o));// JsonConvert.SerializeObject(ti));
            //Connect("127.0.0.1", JsonConvert.SerializeObject(ti));
        }
Example #2
0
 public string turnInstructionToJSON(TurnInstruction t)
 {
     return(JsonConvert.SerializeObject(t));
 }