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:

Read More
 

C++, tokenize a string

I need a cpp function (without using boost, obv) that split a string in parts using an other string as token.

Example input:

[code lang=”cpp” autolinks=”false” collapse=”false” firstline=”1″ gutter=”true” htmlscript=”false” light=”false” padlinenumbers=”false” smarttabs=”true” tabsize=”4″ toolbar=”false”]Center: (8.37, 9.86); Radius: 18.13; Point: (17.83, 6.51)[/code]

Read More

 

[C++] Coding in human language

An old snippet just for fun.

Write C++ code in human language 🙂


Magic.cpp:

#include"Magic.h"

Dear Computer
Please print "Hello World!" string
Then wait until user pressed a key
Best Regards
Programmer

Magic.h

#include<stdio .h>
#include<conio .h>

#define a )
#define Best ;
#define Computer (void){
#define Dear void main
#define key ;
#define pressed (
#define Please printf
#define Programmer
#define print (
#define Regards }
#define string );
#define Then int
#define until =
#define user getch
#define wait x

Have fun!