Thursday, August 2, 2018

Adding a code repository to git hub

1. Create a new Repository in github. and get the git repository url using clone button of the repository.

2. Open cmd

3. Change the current working directory to your local project.

4. Initialize the local directory as the git repository.
git init

5.Add the files in your new local repository. This stages that them for the first commit
git add .
# Adds the files in the local repository and stages them for commit. To unstage a file, use 'git reset HEAD YOUR-FILE'.

6.Commit the files:
git commit -m "First commit"
# Commits the tracked changes and prepares them to be pushed to a remote repository. To remove this commit and modify the file, use 'git reset --soft HEAD~1' and commit and add the file again.

7.At the top of your GitHub repository's Quick Setup page, click  to copy the remote repository UR


8. In the Command prompt, add the URL for the remote repository where your local repository will be pushed.
git remote add origin remote repository URL
# Sets the new remote
git remote -v
# Verifies the new remote URL
9.Push the changes in your local repository to GitHub.

git push origin master
# Pushes the changes in your local repository up to the remote repository you specified as the origin
10 .Pushing changes forcefully in your local repository to GitHub.

git push origin master --force
# Pushes the changes in your local repository up to the remote repository you specified as the origin

Tuesday, November 15, 2011

A basic programme to read and write PWM signal


#include
int pin = 7;
int val  = 0;
Servo myservo;
unsigned long duration;

void setup()
{
  pinMode(pin, INPUT);
  //pinMode(9, OUTPUT);
  myservo.attach(9);
}

void loop()
{
  duration = pulseIn(pin, HIGH);
  duration = map(duration,1160,1780,0,179);
  myservo.write(duration);
}

Wednesday, September 7, 2011

Accelerometer And Gyroscope..

Q: What's the difference between a gyro and an accelerometer? Do I need both?

An accelerometer measures acceleration. A 3-axis accelerometer will tell you the orientation of a stationary platform relative to earth's surface, once that platform starts moving, however, things get more complicated. If the platform is in free-fall, it will show zero acceleration. If it is accelerating in a particular direction, that acceleration will simply be added to whatever acceleration is being provided by gravity, and you will not be able to distinguish. A 3-axis accelerometer in an aircraft in a properly coordinated turn with a 60 degree angle of bank, for instance, will show 2 G "vertical" acceleration in the aircraft, despite the fact that the aircraft is tilted 60 degrees relative to the horizon. So, accelerometers alone can't be used to keep in an aircraft in a particular orientation.

A gyro measures rate of rotation around a particular axis. If a gyro is used to measure the rate of rotation around the aircraft roll axis, it will measure a non-zero value as long as the aircraft is rolling, but measure zero if the roll stops. So, a roll gyro in an aircraft in a coordinated turn with a 60 degree bank will be measure a rate of zero, same as an aircraft flying straight and level. You can approximate the current roll angle by integrating the roll rate over time, but you can't do so without some error creeping in. Just to make life more interesting, gyros drift with time, so additional error will accumulate over a period of minutes or even seconds, and eventually, you'll have a totally inaccurate idea of your current roll angle relative to the horizon. So, gyros alone can't be used to keep in an aircraft in a particular orientation.

So, in a nutshell: Accelerometers are right in the long term but wrong (noisy) in the short term. Gyros are right in the short term but wrong (drifiting) in the long term. You need both--each to calibrate the other--to be right all the time.

But even that only works in for pitch and roll. For yaw, which is orthogonal to gravity, the accelerometers can't help you, so you need something else to correct your drifting yaw gyro. That's either magnetometers (electronic compasses, which are vulnerable to magnetic interference and intertial forces) or GPS.

GPS has a relatively slow update rate (1 to 10 Hz) and is subject to short term errors. It is possible to use GPS alone to keep a very stable and slow flying airframe on a particular ground track on a calm day.

An inertial measurement unit (IMU) combines (fuses) information from two or more sensors, such as gyros, accelerometers, magnetometer, and/or GPS, to determine orientation and velocity vector relative to the earth. The computations are fairly complex, and special filtering is often required to eliminate the measurement noise these silicon devices are subject to, so a "low cost" off-the-shelf IMU with decent specs can easily cost $1000 to $5000 US.

Infra-red horizon sensing "copilots" are inexpensive and work fairly well as long as they have a clear view of the horizon. Unfortunately, mountains, clouds, haze, buildings, etc., will confuse them. [Chris here: I think IR stabalization is more effective than people give it credit for, and is actually rarely confused in standard usage. Both Paparazzi and AttoPilot are built on it, and they work great. See this interview for more.]

In the end, the techniques used to stabilize a UAV will be very much dependent on the intended use, budget, and how comfortable one might be working with sensor fusion, Kalman filters, etc.





Source:DIY DRones

Sunday, May 29, 2011

Thursday, May 12, 2011

Wednesday, April 20, 2011

2 Testing the quadrotor @ IES IPS Academy



See how powerful this Quadrotor "dragon" is? So we tied the threads to this machine.
Again need ur good wishes my friends to make this machine a more stabilised one......

Testing the Quadrotor in IPS Academy



Testing the quadrotor @ the IPS Academy.....The quadrotor understands our commands but still have some problems of balancing so ,we tied four threads so that it will not hit someone and itself with something.

Threads got stressed when it tries to lift up but still we increased the speed only upto 60-70% so as to minimize the risk factor of breaking of any of the components of the quadrotor.

Hoping that very soon we will be able to train this dragon!.......a wonderful and a powerful dragon......Always need ur best wishes....