Show Posts
Pages: 1 ... 54 55 [56] 57 58 ... 137
826  Using Arduino / Storage / Re: Problem data logging with TinyGPS++ and SdFat on: December 15, 2013, 08:10:00 am
The other thing you might want to look into,  is why does you altitude and hdop figure look like nonsense.  Is there a type conflict there ?
827  Using Arduino / Storage / Re: Problem data logging with TinyGPS++ and SdFat on: December 15, 2013, 08:02:22 am
The other problem I can see,  is that 3 second delay at the beginning of loop().    If your GPS is sending you a string every second,   that 3 second delay is going to cause a traffic jam of some kind.    Try making that delay a lot smaller.

I am not too keen on all those datafile.print() function calls.   I'd use sprintf() to write the result into a char array  and then write the whole line to the datafile at once.
828  Using Arduino / Storage / Re: Problem data logging with TinyGPS++ and SdFat on: December 15, 2013, 07:47:57 am
Actually, I should be paying more attention.   You're in Chittagong.

Do you know how GPS modules work ?  It takes a second or two for it to detect the first satellite.  That's when it starts telling you the time and date.   It then takes anything between 10 seconds and 10 minutes to download the satellite almanac  and find at least 3 or 4 satellites.  That is when you get a position fix.   There is a code for this in the NMEA output.

If you don't want those zeros in your file,   don't start storing data in your file until you get that fix.
829  Using Arduino / Storage / Re: Problem data logging with TinyGPS++ and SdFat on: December 15, 2013, 07:43:14 am
if you send the GPS output to your computer instead,  can you see it ?

Are you getting gps readings,   gps doesn't work very well indoors.

The bottom part of the sd file example you show,  looks OK.  You are in India.  The first part is zeros,  because it takes the GPS several seconds or minutes to start. 
830  Using Arduino / Motors, Mechanics, and Power / Re: I want to replace my gate controller with Arduino and don't know what shields on: December 15, 2013, 07:20:54 am
I would buy a small dc motor and a small motor controller shield or breakout,   and experiment with that to get used to it.

A 20 amp motor controller is not something you want to play with until you know what you are doing.

You can also test your limit switch scheme on your small-scale model.

Then get a motor controller for your actual motor.   You want to get an over-rated one to reduce the chance of blowing it up.

831  Using Arduino / Motors, Mechanics, and Power / Re: help me to turn line following bot by 90deg by using interrupters and encorders on: December 15, 2013, 07:10:52 am
If I wanted to turn a small robot right or left by exactly 90 degrees,  I'd use a compass.  About $4 on ebay.    Doing it by trying to measure the wheels will be problematical.   Wheel encoders can measure the distance your robot has travelled,   when  it is going in the straight line.   They don't work particularly well when the robot is turning.
832  Using Arduino / Programming Questions / Re: Question about Arrays. on: December 15, 2013, 06:33:33 am
It used to be the case that your array in the first post could be declared as

Code:
char keys[][COLS] = {
   {'1','2','3'},
   {'4','5','6'},
   {'7','8','9'},
   {'*','0','#'}
};

because the compiler could figure the first dimension out.  I'm not sure if this is still legal.   Anyway, it doesn't make much sense
to do it,  if you know what the dimension is,  unless you are trying to confuse someone looking at your code.
833  Using Arduino / Programming Questions / Re: Problem with creatint small sub on: December 15, 2013, 06:18:30 am
You reference an apparent variable newXAxis which doesn't seem to be declared anywhere.
834  Using Arduino / Programming Questions / Re: Problem with creatint small sub on: December 15, 2013, 06:16:57 am
Which line of the code generates the error ?
835  Using Arduino / Programming Questions / Re: SD Card web page that toggles button image on: December 15, 2013, 06:13:52 am
Isn't it an issue of the client browser refreshing the page somehow ?
836  Using Arduino / Programming Questions / Re: accumulate time an input is state HIGH on: December 14, 2013, 04:29:03 pm
Each time the state goes from Low to High,   remember what the millis() time is,   when that happens.

Each time the state goes from high to low,   get the current millis() time,  and subtract from it the time when
the high period started.   That will tell you the duration of the most recent high event instance.

Add this duration to another variable which will then contain the accumulated total time of all the high instances.

Note this will only update the total accumulated high time,   after each high event has ended.  If you want to
continually update the accumulated high time during the current high event, it gets more complicated.
837  Using Arduino / Sensors / Re: GY-521 gyroscope/accelerometer breakout board on: December 14, 2013, 02:25:25 pm
I don't think they are inverted,  I think you are misunderstanding what the values represent.
838  Using Arduino / Programming Questions / Re: Magnetometer HMC5883 , works only when "shaking" it. on: December 14, 2013, 02:15:23 pm
As a general principle,   it is a poor practise to ever write

Quote
float x ;
if ( x == 0.8 )
{
}

Testing the equality of floating point numbers tends to cause all sorts of unreliability.


839  Using Arduino / Programming Questions / Re: Magnetometer HMC5883 , works only when "shaking" it. on: December 14, 2013, 02:11:09 pm
There seems to be a problem with all the application examples for that device.

You are supposed to send an I2C message to the device to configure it.  The code examples expect some response to that,   and when they don't get the expected response,   the code prints that error message.   That doesn't actually seem to matter,  because it works anyway.     I don't know why nearly all of the examples on the internet make this mistake.

You need to ascertain what the device is actually doing.  Try using Serial.print() to output the actual XYZ components of the geomagnetic field vector which is being returned by the device.  When you turn it around,  you should see them change.

840  Using Arduino / Sensors / Re: How to use PS2 mouse's encoders to measure angular velocity? on: December 14, 2013, 07:41:26 am
To answer your other question,   you'd have to find out what a "dot" is.     Someone must know, I don't.   It's probably 1/100 of an inch or 1/72 of an inch,  or something.    I had an early 80's book on how this stuff actually works,  but I can't find it right now.  Do an experiment.    Move the mouse exactly one inch,     and add up how many dots that it reports it has moved.   In your previous experient,   your mouse moved 11 dots to the left in 5 hundredths of second.   How far did you move it ?
Pages: 1 ... 54 55 [56] 57 58 ... 137