Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / ArduIMU V3 Z Yaw Drift on: December 06, 2012, 10:29:12 am
Hi everyone,
I have a problem with arduimu. I attact Arduimu code . When I upload code and run test program , Z yaw always drift. What can ı do ? Can ı use Complementary filter and How ı use ?      
2  Using Arduino / Installation & Troubleshooting / error compiling on: November 01, 2012, 04:57:18 am
Hi everyone ! I bought arduino mega adk . I installed its driver. when I compile blink example . it take 5 minute and after that it give just error compiling . there is no reason for error, just error compiling . what does it mean ?
3  Using Arduino / Programming Questions / Re: Arduino Duemilanove and Hmc5883l on: May 11, 2012, 04:08:59 pm
already ı use z and y axis thank you so much . but ı wonder why x axis usually 0 ?
4  Using Arduino / Programming Questions / Re: Arduino Duemilanove and Hmc5883l on: May 11, 2012, 09:53:18 am
Code:
/*
HMC5883L_Example.ino - Example sketch for integration with an HMC5883L Triple Axis Magnetometer.
Copyright (C) 2012 Love Electronics (loveelectronics.com)

This program is free software: you can redistribute it and/or modify
it under the terms of the version 3 GNU General Public License as
published by the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

// Reference the I2C Library
#include <Wire.h>
// Reference the HMC5883L Compass Library
#include <HMC5883L.h>

// Store our compass as a variable.
HMC5883L compass;
// Record any errors that may occur in the compass.
int error = 0;

// Out setup routine, here we will configure the microcontroller and compass.
void setup()
{
  // Initialize the serial port.
  Serial.begin(9600);

  Serial.println("Starting the I2C interface.");
  Wire.begin(); // Start the I2C interface.

  Serial.println("Constructing new HMC5883L");
  compass = HMC5883L(); // Construct a new HMC5883 compass.
   
  Serial.println("Setting scale to +/- 1.3 Ga");
  error = compass.SetScale(1.3); // Set the scale of the compass.
  if(error != 0) // If there is an error, print it out.
    Serial.println(compass.GetErrorText(error));
 
  Serial.println("Setting measurement mode to continous.");
  error = compass.SetMeasurementMode(Measurement_Continuous); // Set the measurement mode to Continuous
  if(error != 0) // If there is an error, print it out.
    Serial.println(compass.GetErrorText(error));
}

// Our main program loop.
void loop()
{
  // Retrive the raw values from the compass (not scaled).
  MagnetometerRaw raw = compass.ReadRawAxis();
  // Retrived the scaled values from the compass (scaled to the configured scale).
  MagnetometerScaled scaled = compass.ReadScaledAxis();
 
  // Values are accessed like so:
  int MilliGauss_OnThe_YAxis = scaled.XAxis;// (or YAxis, or ZAxis)

  // Calculate heading when the magnetometer is level, then correct for signs of axis.
  float heading = atan2( scaled.YAxis,scaled.XAxis);
 
  // Once you have your heading, you must then add your 'Declination Angle', which is the 'Error' of the magnetic field in your location.
  // Find yours here: http://www.magnetic-declination.com/
  // Mine is: 2� 37' W, which is 2.617 Degrees, or (which we need) 0.0456752665 radians, I will use 0.0457
  // If you cannot find your Declination, comment out these two lines, your compass will be slightly off.
  float declinationAngle = 0.0457;
  heading += declinationAngle;
 
  // Correct for when signs are reversed.
  if(heading < 0)
    heading += 2*PI;
   
  // Check for wrap due to addition of declination.
  if(heading > 2*PI)
    heading -= 2*PI;
   
  // Convert radians to degrees for readability.
  float headingDegrees = heading * 180/M_PI;

  // Output the data via the serial port.
  Output(raw, scaled, heading, headingDegrees);

  // Normally we would delay the application by 66ms to allow the loop
  // to run at 15Hz (default bandwidth for the HMC5883L).
  // However since we have a long serial out (104ms at 9600) we will let
  // it run at its natural speed.
  // delay(66);
}

// Output the data down the serial port.
void Output(MagnetometerRaw raw, MagnetometerScaled scaled, float heading, float headingDegrees)
{
   Serial.print("Raw:");
   Serial.print(raw.XAxis);
   Serial.print("   ");   
   Serial.print(raw.YAxis);
   Serial.print("   ");   
   Serial.print(raw.ZAxis);
   Serial.print("   Scaled:");
   
   Serial.print(scaled.XAxis);
   Serial.print("   ");   
   Serial.print(scaled.YAxis);
   Serial.print("   ");   
   Serial.print(scaled.ZAxis);

   Serial.print("   Heading:");
   Serial.print(heading);
   Serial.print(" Radians   ");
   Serial.print(headingDegrees);
   Serial.println(" Degrees   ");
}
sorry for my bad english
5  Using Arduino / Programming Questions / Re: Arduino Duemilanove and Hmc5883l on: May 11, 2012, 08:35:34 am
when ı move up or down sensor degrees changed . ı cant understand , ı use hmc for digital compass so which axis ı use ?
6  Using Arduino / Programming Questions / Re: Arduino Duemilanove and Hmc5883l on: May 11, 2012, 07:51:01 am
ı cant take true values , when ı turn sensor . image values1 ; values changed when ı turn sensor . image values  ; radian and degrees dont changed with other values .they are 272 degrees and 90 degrees , 4.76 radian and 1.72 radian . image calculate radian degrees show us how calculate radian and degrees . what is my wrong ?
7  Using Arduino / Programming Questions / Re: Arduino Duemilanove and Hmc5883l on: May 09, 2012, 01:09:53 pm
ı have 3 or 4 eval board if it fried , ı will try with other board . ı connect vddıo and vcc and  ı see values serial port when i2c connected . but always 92.62 or 272.62 . when ı turn sensor ı see 92.62 . ı turn again and ı sea 272.62 . ı think there are wrong calculations . 
8  Using Arduino / Programming Questions / Re: Arduino Duemilanove and Hmc5883l on: May 09, 2012, 03:06:00 am
there is my circuit
9  Using Arduino / Programming Questions / Re: Arduino Duemilanove and Hmc5883l on: May 08, 2012, 03:54:15 pm
my power supply already 3.3 volt and pullups work with 3.3v . ı use a4 pin for sda ,a5 pin for scl .
10  Using Arduino / Programming Questions / Re: Arduino Duemilanove and Hmc5883l on: May 07, 2012, 04:36:41 pm
ı use pull up res. (10k) between vcc and scl ,vcc and sda . but it is same . nothing happen . help me smiley
11  Using Arduino / Programming Questions / Re: Arduino Duemilanove and Hmc5883l on: May 07, 2012, 07:56:00 am
there are hmc5883l.cpp and hmc5883l.h
12  Using Arduino / Programming Questions / Re: Arduino Duemilanove and Hmc5883l on: May 07, 2012, 07:45:03 am
@NI$HANT  thank you for helping , ı check baudrate . they are same
13  Using Arduino / Programming Questions / Re: Arduino Duemilanove and Hmc5883l on: May 07, 2012, 07:41:26 am
ı have hmc5883l eval board http://tr.farnell.com/honeywell-ssec/hmc5883l-eval/magnetic-sensor-evaluation-board/dp/1863713 so ı havent pull up resistors. you can see my problem from images
14  Using Arduino / Programming Questions / Arduino Duemilanove and Hmc5883l on: May 07, 2012, 06:44:45 am
hi ! ı have arduino duemilanove and  ı use hmc5883l . ı find that link https://www.loveelectronics.co.uk/Tutorials/8/hmc5883l-tutorial-and-arduino-library . ı try that code but ı cant see anything in serial port . but ı can see some values when ı remove hmc5883l . what can ı do ? and sorry, my english isnt good .
Pages: [1]