Debug (and control) your Robotic Arm with iOS

This is my work in progress ~50cm Robotic Arm with 6 AXIS Servo motors, an Arduino and a RaspberryPi (for image recognition in phase 2):

Arduino Robotic Arm 6AXIS iOS controlled

While writing the C++ code in Arduino I found I needed a way to send easily and fast commands to Arduino with my iPhone using Bluetooth.

Basically I need to control my robotic arm using an external device instead of running and running again the code on the Arduino board.

For this reason: I’ve attached a BLE board to Arduino and I have created a simple app (completely written in SwiftUI 😍😎) that use BLE connection to connect to Arduino BLE board and send string commands that are parsed and executed.

Commands sended are like:

Continue reading “Debug (and control) your Robotic Arm with iOS”

Swift – Push UIView animation

Simple code snippet today that show how to push a UIView and obtain the same effect of a UINavigationController as push action, choosing also the side (.fromLeft / .fromRight).

We can do this using the CATransitionanimations. Very simple:

func push( view: UIView, side: CATransitionSubtype = .fromRight ) {
    let transition = CATransition()
    transition.type = CATransitionType.push
    transition.subtype = side

    self.layer.add(transition, forKey: nil)

Enjoy pushing!