ev3ios
ev3ios copied to clipboard
Noobie Question
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?
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