ev3ios icon indicating copy to clipboard operation
ev3ios copied to clipboard

Noobie Question

Open FrankyZ123 opened this issue 5 years ago • 1 comments

Apologies for the VERY noobie question but can't seem to find the answer elsewhere. I'd love to build a basic iOS app to connect to my EV3 cell but not sure what steps to take from this repo --> successful connection. Any chance you could point me in a direction?

FrankyZ123 avatar Apr 16 '20 19:04 FrankyZ123

Hi, you just need to obtain the EAAccessory and then it should work like the following:

private func connect(accessory: EAAccessory){
    connection = Ev3Connection(accessory: accessory)
    brick = Ev3Brick(connection: connection!)
    connection?.open()
}

Once you have the brick ready, you are able to control it:

brick.directCommand.turnMotorAtSpeed([.A, .B], -50)

Here you can find an example app: https://github.com/chihayafuru/SampleOfEV3IOS/tree/master/sample_of_ev3ios

andiikaa avatar Apr 27 '20 09:04 andiikaa