Jul 1, 2015 at 9:44 PM
Edited Jul 1, 2015 at 9:46 PM
so I have an EV3, flashed with 1.04h and an Edimax Wifi stick. This seems to work fine in the standard lego application. It connects to my router, i can play sound over wifi and move the motors.
Then I tried it over the ev3 c# desktop api. When I do a fresh start of my EV3 model, freshly connect it to my router, then start my program and connect it, it connects successfully, plays a sound and moves the motors:
_robotDog = new Brick(new NetworkCommunication(adress));
_robotDog.BrickChanged += _robotDog_BrickChanged;
connected = true;
await _robotDog.DirectCommand.PlayToneAsync(20, 1000, 300);
await _robotDog.DirectCommand.TurnMotorAtPowerForTimeAsync(OutputPort.B, 50, 400, true);
await _robotDog.DirectCommand.TurnMotorAtPowerForTimeAsync(OutputPort.C, 50, 400, true);
I think, there is nothing special in this code. However, if I immediately after those commands try to execute another command (e.g. I again send those two motor-commands from the above example after a button press in the application), it takes half a minute,
until the commands arrive at the ev3 model... Not exactly, what I imagined.
My next problem is: I close my application, start it again, and try to reconnect - nothing happens. Sometimes however, if I wait long enough, I notice that the eyes of the ultrasonic sensor light up again. Then I sometimes can reconnect to the EV3... I have
no idea where this behaviour comes from and what I have to do, to simply connect to the unit whenever I want and then send commands just like I want to...
Any help is appreciated! Thanks in advance!