Servo control IoT server using Raspberry Pi and client using iPhone developed only Swift.
URLSession (iPhone X) -> Vapor (Raspberry Pi Zero W) -> SwiftyGPIO (Raspberry Pi Zero W) -> Servo motor (MG996R)
Written all options in ./Makefile
.
$ make open
Install Swift 4 (Swift 5 is not released yet)
See Official Swift-Arm Community Releases - swift-arm
$ make install-swift-raspberry-pi-zero
Install Swift 5
$ make install-swift-raspberry-pi-without-zero
Install libssl-dev
$ make deps-debian
Install libressl
ios-sim
$ make deps-macos
Not supported (Only macOS and Ubuntu)
$ make deps-macos
$ make build-server
$ make build-client
$ make run-server
$ make run-server HOSTNAME=localhost PORT=8080
HOSTNAME: (detault: localhost)
PORT: (detault: 8080)
Open workspace and Run on Xcode (Not work ios-sim on Xcode 10.2)
See List empty of devices simulator with Xcode 10 #234 - ios-control/ios-sim
Xcode > Edit Scheme... > Run - Arguments > Environment Variables
HOSTNAME: (detault: localhost)
PORT: (detault: 8080)
$ make test-server
$ make test-client