Tuesday, 24 May 2016

Android App Development using Processing - Part II : Intro to Programming

Last time we have installed Android Studio and Processing software. Now it's time to start programming.(I assume you have some basic knowledge of programming )
Usually, every processing Sketch has two functions
1. Setup 
This function runs once only when sketch initiated.
All things that need to be run just once can put under this function like defining the size of the screen.
2. Draw
 After the sketch is initiated and Setup part is run then Draw part runs forever until the program is shut down.
Basically, it works as an infinite loop.
All the things that need to run for entire time like feedback from user need to put inside Draw function.

Example 
    Let's take an example of loading an image on the screen.



Description
    PImage : Datatype for storing images.
    size : For Screen size
    loadImage : Loads an image into a variable of type PImage
    image : The image() function draws an image to the display window




Code:

PImage bg,bg1;
int click=0;
void setup()
{
  
  size(displayWidth,displayHeight);
  orientation(PORTRAIT);
  bg = loadImage("bg.jpg");
  bg1 = loadImage("bg1.jpg");
  imageMode(CENTER);
  textSize(height/11);
}

void draw()
{
  if(click%2 == 0)
  image(bg, width/2,height/2,width,height);
  else
  image(bg1, width/2,height/2,width,height);
}
void mousePressed()
{
 click+=1;
  


Sunday, 1 May 2016

Android App Development using Processing - Part I : Installation

INTRODUCTION: What is Processing?
An open-source platform for developers and tinkerers to code for graphics and visual arts.
or
Processing is a flexible software sketchbook and a language for learning how to code within the context of the visual arts.
  • » Free to download and open source
  • » Interactive programs with 2D, 3D or PDF output
  • » OpenGL integration for accelerated 2D and 3D
  • » For GNU/Linux, Mac OS X, and Windows
  • » Over 100 libraries extend the core software
  • » Well documented, with many books available
HOW TO INSTALL?
  1. Download and Install Android Stand-alone SDK toolkit.
  2. In android SDK manager install 'Android SDK Tools','Plateform Tools','Build Tools' & 'Android 4.1.2'.
  3. Download Processing and install it.
  4. Open Processing.exe and go to Add Mode and add Android Mode.
  5. Select Android mode instead of Java mode, a comment will show up asking ' Is android SDK installed?' , then choose to  'locate SDK path manually' and go to Android SDK folder and select it.
  6. Installation Done, Enjoy!


Stay tuned...

Thursday, 28 April 2016

HEXAPOD-Using 2 DC motors

hexapod robot is a mechanical vehicle that walks on six legs. Since a robot can be statically stable on three or more legs, a hexapod robot has a great deal of flexibility in how it can move. If 1 or 2 legs become disabled, the robot may still be able to walk.
Basically, a hexapod uses 3 or 6 actuators but here we have designed the robot in such a manner that it can work properly by using just 1 or 2 motors. For such design, I have utilized 4-bar mechanism and not one or two here I have used six 4-bar mechanisms.
What is a 4-bar mechanism?
4_bar_linkage_animated

Innovation
Basically, the innovation is in the Design of the hexapod, by merging three 4-bar mechanisms each side we made a planer mechanism which can be run by just one motor.
Untitled
Untitled1
Here I have shown all 4-bar mechanism by different colours line on linkages
After Designing the mechanism now its time to do some analysis, For analysis, I have used Adams.
First Prototype
Untitled-1


Team
Akash K. Jain
Vikash Singh Rajput

BiPed Robot

History
From the beginning of time human had a desire to replicate himself and with this desire, he started building robots and tried his best to give a shape similar to human. This desire became the motivation to build biped robots.
What is a Biped robot?
Basically, a Biped robot is a replica of the human lower limb which can stand and walk on two legs. Main challenge behind a Biped is balancing.
For more info on biped, you can check Wikipedia
Structure
Structure for stability
We have decided to use legs with two joints of DOF one. That means you have a total of 2 DOF for both legs. Centre of mass is being balanced in between both legs while standing and on a single leg while moving. For balancing COM on a single leg, we have used feet of large surface area.



Motion
Movement of robot happens in 3 repeating steps. First the entire body tilts to move the COM on a single leg, let say on left leg. Because of this shift in COM the right leg is free to move, this time, the robot takes its first step and right leg moves forward. Then again COM shifts to centre but legs are not in same vertical or not parallel. Now the same steps repeat but with opposite legs, that means the entire body tilts towards right instead of the left and left leg will come forward.
360 Video of different positions (Moblie users should open this in YouTube app)



Electronics 
For actuation, we have used 4 servo motors, that means precisely controlled one degree of freedom. For controlling these servos I have used Arduino, an open-source microcontroller. The code for Arduino is Biped Code.
Circuit
All the signal pins of servos shall be connected to pins as shown in fig below, and ground and Vcc pins shall be connected to GND and 5V of Arduino respectively.CIRCUIT
Final Video



Team
This project is done as Gymkhana Projects under Robotics Club IIT Indore.
Team members-
  • Bittu Kumar
  • Khushboo Agrawal
  • Mohini Phulwalkar
Mentor-
Akash K. Jain