Wednesday, June 15, 2016

Controlling MeArm Robot arm from an android device

I recently bought a MeArm robot arm and assembled.


This consists of 4 servo motors to control base, shoulder, elbow and gripper. Later I found "MeArm Controller" android application and decided to configure arduino bluetooth module to complete my setup.

Following is the breadboard view of my configuration.


I found it bit hard to configure the android app for the first time hence decided to note down configuration steps below.

1. Turn bluetooth on and open the application.






















2. Press the settings icon (triangle just below Reset button). This should take you to the following screen.




















3. Press the Connectivity button.




















4. Then tap on the bluetooth icon and select the correct address.
Now you should get a screen saying connected :)























5. Select the slider mode then provide Servo IDs.




















6. Press OK and you should get a screen similar to the following, where you have controls to the 4 servo motors.




















Here is my messy robot arm config,


Arduino sketch: (Credit to the original creator- I have only  modified baudrate for the bluetooth module)


Wednesday, June 8, 2016

Measure performance of a given JavaScript code

console.time("for loop");
for(var i=0; i < 100; i++){
  console.log("i is: " + i);
}
console.timeEnd("for loop");