Show Posts
Pages: 1 ... 54 55 [56] 57 58 ... 136
826  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.
827  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

float x ;
if ( x == 0.8 )

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

828  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.

829  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 ?
830  Using Arduino / Sensors / Re: How to use PS2 mouse's encoders to measure angular velocity? on: December 14, 2013, 07:37:14 am
Anyway, I suppose that X and Y mean the coordinates  cursor would have on computer's screen.

No,  it is not a coordinate position.   It is just the direction.  X means left and right.  Y means up and down.   If you look inside the mouse,   you will see two separate mechanisms measuring the position of the rotating mouse ball.

The mouse doesn't know anything about your computer screen.    The pointer on the screen is controlled by the screen display software,  not the mouse.  The mouse only knows how it is rolling around your desk.     The mental illusion of the link between the mouse on the desk and the pointer on the screen is actually a remarkable invention that everybody takes for granted.
831  Using Arduino / Sensors / Re: ACS712 Power Spikes Resetting Mega 2560 on: December 14, 2013, 07:23:46 am
I'd be cautious about "assuming" anything.

Even if your lamp transiently consumes 400 watts when it starts up,  that is still only about 4 amps so not outside the capability of your current sensing device.

How is your arduino powered ?  Batteries or wall-wart ?   The possibility cannot be entirely ruled out,   that starting up one device causes enough voltage disturbance in the mains supply to disrupt the arduino,   not through the connection to the sensor,  but the power supply.
832  Using Arduino / General Electronics / Re: Gyroscope help on: December 12, 2013, 01:30:01 pm
The gyroscope will not tell you the orientation of the cube,  it will tell you the rate at which the cube is spinning.
833  Using Arduino / General Electronics / Re: Using a capacitor on: December 12, 2013, 01:28:37 pm
Farad is the amount of charge ( in coulombs ) which is stored in the capacitor,  per volt of charge.

But it isn't really like a water tank.

If you charge the one Farad capacitor until it has a voltage of 1 volt,  then it has one coulomb of charge in it.   But if you charge it to 2 volts,  then it has 2 coulombs.   Each extra coulomb you can stuff in there,  increases the terminal voltage by one volt.  Until you reach the breakdown voltage of the device where it will fail.

The reason that is not really like a water tank,  is that (liquid) water is basically incompressible,   you cannot stuff much more water into a water tank by increasing the pressure.    It is more like a compressed gas tank.
834  Using Arduino / General Electronics / Re: Need help with photocells on: December 12, 2013, 01:20:49 pm
Try reading this
835  Using Arduino / General Electronics / Re: Need help with photocells on: December 12, 2013, 01:18:41 pm
Photoresistors have a variable resistance, depending on the amount of light falling onto their active surface.

You measure the light by measuring the analog voltage across the device, using the analog input of the arduino.   It is not a digital, on-off, signal,  unless you build some kind of external circuit to create such a signal.

836  Using Arduino / General Electronics / Re: Why are switches followed by a Resistor? on: December 12, 2013, 01:16:03 pm
The word "random" has several meanings.     When you are trying to get input from a button (  and not trying to build some kind of random number generator ),   the key point is that if you don't have either a pull-up or a pull-down resistor,    then the state of the input pin when the button device is open,   is indeterminate.   You cannot rely in your code on the input pin having a predictable state,  that is what random means in this context.
837  Using Arduino / Motors, Mechanics, and Power / Re: Brushless hub motor arduino control on: December 12, 2013, 01:08:01 pm
You reverse a multphase motor by reversing the current, the commutation is unchanged
other than the reverse current sense to the relevant pair of windings.  You can also
think of this as 180 phase shift in the hall sensors (simply invert them all)

To me,  both of those explanations seem odd.    The way I see it,  to make the motor run the other way,   you excite the three phases in the opposite order.
838  Using Arduino / Motors, Mechanics, and Power / Re: Using arduino (not UNO) motor shield compatible on: December 12, 2013, 01:00:02 pm
The short answer would be no.  The shields are designed to plug in "on top of" the large arduinos which all have the same or similar
layout of the pin headers on the top.

You could still use the shield, but you will have to figure out which pins need to be connected,  and then connect them manually with jumper wires.    Or make a custom PCB for yourself.
839  Using Arduino / Motors, Mechanics, and Power / Re: Accell stepper lib issue, and advice needed.. on: December 12, 2013, 12:57:47 pm
Your story is very complicated,  and I got confused.    You need to focus on getting one device to work at a time.

You also need to post the code that doesn't work.
840  Using Arduino / Sensors / Re: Problems with MPU 6050 on: December 12, 2013, 12:51:49 pm
Well try the same solution, then.
Pages: 1 ... 54 55 [56] 57 58 ... 136