Connection problems

HomeForumsMonoBrick Communication LibraryConnection problems

This topic contains 0 replies, has 1 voice, and was last updated by Author Image Przemek Ornot 3 years, 1 month ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #4496
    Author Image
    Przemek Ornot
    Participant

    I start the EV3 brick with the MonoBrick firmware and connect to WiFi. Then I run this simply program in Xamarin Studio.

    using System;
    using MonoBrick.EV3;

    public static class Program{
    static void Main(string[] args)
    {
    var ev3 = new Brick<Sensor,Sensor,Sensor,Sensor>(“wifi”);
    try{
    ev3.Connection.Open();
    ev3.MotorA.On(50);
    System.Threading.Thread.Sleep(3000);
    ev3.MotorA.Off();
    }
    catch(Exception e){
    Console.WriteLine(e.StackTrace);
    Console.WriteLine(“Error: ” + e.Message);
    Console.WriteLine(“Press any key to end…”);
    Console.ReadKey();
    }
    finally{
    ev3.Connection.Close();
    }
    }
    }

    It started but it gives back an error message:
    at MonoBrick.WiFiConnection’2.Open()
    at Program.Main(String[] args) in …
    What can be the reason for that?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

Posted in

Make a donation