Show Posts
Pages: 1 ... 44 45 [46] 47 48 ... 194
676  Using Arduino / Sensors / Re: How do I wire up a sensor with an Arduino? on: May 26, 2014, 04:38:10 am
TX pin is designed for UART signalling to another uart device.

It will not communicate easily with devices that use different signally such as I2c or SPI.

You seem to be deeply confused about almost everything.  I suggest you start by reading some of the many online basic tutorials  or find an introductory book.
677  Using Arduino / Sensors / Re: Which motion sensor would I use? on: May 26, 2014, 04:29:42 am
For person walking into room,  your choices are

PIR motion sensor.  detects warm people.  only works if room is cold,  and not zombie.
Some kind of beam interruption sensor in the doorway.

For mailbox:

Some kind of reed switch or hall effect sensor,  triggered by the movement of a magnet glued onto the mailbox door.
678  Using Arduino / Sensors / Re: Getting RPM by measuring non-symetric signal. on: May 26, 2014, 04:26:54 am
and made a first pass at correlating the pulse count to Miles-per-hour (I'd thought it would be linear, but it isn't).

Your idea that it would be linear,  is mis-conceived.

It IS linear,  but you have your units upside down.    The pulse counter correlates directly  to  hours per mile.
679  Using Arduino / Sensors / Re: Getting RPM by measuring non-symetric signal. on: May 26, 2014, 04:22:27 am
The duration of the pulses should not concern you too much,    what you need to measure is the elapsed time between pulses.   

Since you appear to be getting two pulses per wheel revolution,   you actually want to measure the time from the rising ( or falling ) edge of a pulse,   not to the next pulse,   but to the pulse after that.

If doesn't matter if you are detecting the first pulse of each pair,   or the second pulse of each pair,  you just want to measure the time between every second pulse.
680  Using Arduino / Sensors / Re: 3-axis accelerometer readings on: May 26, 2014, 04:10:39 am
It's unlikely that "the readings will be off",  with an I2C device.    The communications either work,  or they don't.

Check if your unit requires a range setting,  many such devices require you to select between +/-2g or +/- 8 g.

You might also think about 3V/5V issues.
681  Using Arduino / General Electronics / Re: Arduino sampling speed on: May 26, 2014, 03:53:22 am
The steel on your barbecue will be vastly different then the steel holding up a skyscraper.

The speed of sound in it  isn't, though.
682  Using Arduino / Programming Questions / Re: 'EEPROM' was not declared in this scope error on: May 26, 2014, 03:47:17 am
For some reason,   the compiler cannot find  eeprom.h.    Check it is in the correct place.
683  Using Arduino / Programming Questions / Re: IF and && on: May 26, 2014, 03:45:01 am
If you want to turn it off,   then you need to add some code to turn it off.
684  Using Arduino / Programming Questions / Re: how to store characters? on: May 26, 2014, 03:43:29 am
That is one of the most ridiculous programs I have ever seen.

But anyway,   what do you mean by "store" a character ?   Where do you want to store it,   and how long do you want to store it for ?

The simple answer would be,   in a variable or array of type char.
685  Using Arduino / Programming Questions / Re: Arduino Bitwise operation on: May 26, 2014, 03:36:10 am
The first question:   it looks wrong.   There is no legitimate meaning.   There are whole websites dedicated to obscure scam-code like this.

The second question:   What they are doing there, is shifting w to the right,  and  "and" ing with 1.  That is,  00000001.    That will result in a one or a zero depending on the corresponding bit of w which you shifted there.    That is a normal method of outputing the bits of w,  one bit at a time,   to a serial output of any kind.
686  Using Arduino / Programming Questions / Re: expected unqualified-id before '[' token on: May 24, 2014, 01:00:18 am
I bet that code came from Java.
687  Using Arduino / Sensors / Re: Heading magnetometer HMC5883L, tilted. on: May 23, 2014, 02:08:56 pm
688  Using Arduino / Sensors / Re: [Solved] Transimpedance Op-amp decreasing small signals amplifying larger ones? on: May 23, 2014, 02:03:53 pm
Why use a transimpedance op-amp at all ?

Well the relevant output of the photodiode is a current proportional to the light level,   but to eventually read this as an analog input,  you need to create a voltage proportional to that current.
689  Using Arduino / Programming Questions / Re: Function Keys Question. on: May 23, 2014, 01:56:13 pm
The example  I found looks a bit different

void loop() {
  while (digitalRead(2) == HIGH) {
    // do nothing until pin 2 goes low
  // new document:;'n');
  // wait for new window to open:

Does it matter which key you release first ?

What I would do next,   is figure out how to observe the actual character/bytes being received at the other end.    It is likely that the ctrl character is there,  but you just are not seeing it.
690  Using Arduino / Programming Questions / Re: Function Keys Question. on: May 23, 2014, 01:50:43 pm
Your code will send an 'n',  every 1.5 seconds,   whether you pressed any buttons,  or not.   Thats one of your problems.

The other part of the problem,  I don't understand.   Are you trying to read this keyboard,   or write to one ?   

You may be trying to write the keys to the keyboard,   and then expect the keyboard to pass the keystrokes on to a computer.   I don't quite see how this can work,    the keyboard would be controlled either by the computer or the arduino,  but not both.

It may be ok on a teensy,  I don't know,  but I'd also check whether pin 0 is a good pin to use.

Pages: 1 ... 44 45 [46] 47 48 ... 194