Show Posts
Pages: 1 2 [3] 4 5 ... 15
31  Using Arduino / Project Guidance / Re: Connect 2 or more MPU6050 on board arduino Uno R3 on: March 13, 2014, 11:29:06 am
If you have the code now that works with one sensor, you already have the answer.

Hint:  when you start an instance of a code function, you give it a name and parameters (which, in I2C functions, also specify the device's address).  If you need to start another instance of the same code, you give it a slightly modified name, to indicate a different instance (and specify different parameters, like the I2C address).

Maybe something like:

Wire.begin();
Wire2.begin();

.........

  Wire.beginTransmission(MPU6050_I2C_ADDRESS);
  n = Wire.write(start);
  if (n != 1)
    return (-10);
  n = Wire.endTransmission(false);    // hold the I2C-bus
  if (n != 0)

 Wire2.beginTransmission(MPU6050_I2C_ADDRESS);
  n = Wire.write(start);
  if (n != 1)
    return (-10);
  n = Wire2.endTransmission(false);    // hold the I2C-bus
  if (n != 0)
32  Using Arduino / Project Guidance / Re: Project guidance for code-based locker opener on: March 13, 2014, 11:16:43 am
1.  do not use a 9v 'transistor battery'.
2. do not use batteries at all, since it is an indoor application.  Use distributed power from an A/C sourced power supply.

Barring the above, there are scripts out there to monitor battery voltage (the first indication that you are heading for death).

Also, to reduce constant power demands and avoid being hopelessly locked out in a power fail (dead battery or loss of A/C source),  use two solenoids: one to pull bolt into locked position and one to pull the bolt into the open position.  Momentary kick on the solenoid moves the bolt into desired position and then you cut power to the solenoids.  Also might be a good idea to incorporate a micro-switch on the door to disable the locking solenoid when the door is open.  good luck and y'all have fun now, ya hear?
33  Using Arduino / Project Guidance / Re: Connect 2 or more MPU6050 on board arduino Uno R3 on: March 13, 2014, 11:04:29 am
How do YOU do it with just one sensor?

Hint:  each sensor has an address and each object has a name.
34  Using Arduino / Project Guidance / Re: Tamiya IR battle system on: March 13, 2014, 10:57:50 am
Check out 'rcuniverse.com' RCTanks WarRoom Forum.  There used to be a guy on there who was making PIC based battle boards and IR apples do go in HL tanks and battle Tamiyas.
35  Using Arduino / Project Guidance / Re: Arduino UNO brass annealer project help..... on: March 11, 2014, 01:15:45 pm
"sure wish there was a way to display the code line number on the side of the editor so I could just glance down instead of having to click or arrow key up or down to figure out what line is screwed up"

If you place the cursor on the error messave, doesnt the ide highlight the erring line in the source??
36  Using Arduino / Project Guidance / Re: em-406a help on: March 11, 2014, 01:04:51 pm
Ignore everything but the MRC sentences.
37  Using Arduino / Project Guidance / Re: Measuring Speed of Cars with Pressure Sensor. on: March 11, 2014, 12:14:28 pm
Counting preasure impulses and trying to measure the time delta between is not going to give you speed, it gives you axle count.  You would need to determine vehicle start and end with something like an active inductor (metal detector) or some other proximity detector.  and you need a seperate sensor package for each trafic lane.  Proximity sense high, vehicle present, so count the pulses and time delta, calculate velocity with interpolated vehicle length and axle count.  Proximity sense low, reset counts and wait for next victim.  Turned out to be a bit*% of a senior project before there were micro controllers available.
38  Using Arduino / Project Guidance / Re: Read out Hbridge output on: March 06, 2014, 08:37:12 am
Well, sorta.... Arduino can not handle voltage swings below 0 V.  One of the functions (the main one) of a full H-Bridge is to reverse the voltage at the motor terminals.  You can use various techniques (like sample a voltage ladder output that gas been offset to rais it beyond 0V) to try to get arround this, but is what you want to do worth the effort?  What do you want to do with the readings?
Display the voltage applied to the motor (what good is that beyond forward or backward?) why not pick up one of those digital pannel voltage modules (cheap and easy, check out someplace like MPJones).
Display/indicate direction (polarity), output percentage?  think about decoding the H-Bridge inputs and measuring pulse counts in (nice clean digital that Arduino can easily handle).
39  Using Arduino / Project Guidance / Re: Please help with Interrupt handler for keypad pin entry on: March 06, 2014, 08:21:14 am
Tech,

"Shouldn't be using microseconds" does NOT mean to pull it fron your code, it means "change Micros to Millis".

Your loop code doesn't need to be shortened, your Interrupt Service Routine does.  Try letting your ISR set a flag to indicate condition and return to your main loop.  Then let subs in the main code determine what the condition needs, what appropriate action to take, perform the action, and then reset the flag. That lets you take as long as you need to address the action.
40  Using Arduino / Project Guidance / Re: lasers connected to arduino on: March 04, 2014, 02:26:33 pm
640nm (nanometers, not miliAmps) that's the wave length of the LASER emmission, not the power consumed.
But you are still talking about way too much current draw for sixteen 5mW modules.
41  Using Arduino / General Electronics / Re: Noise from multiple cheap RF transmitters? on: February 27, 2014, 03:17:55 pm
Aren't those A.M. units (not real good for dependable data traffic)?
Try polling your remotes. Means you nees a transmitter and reciever for each unit.  Keep your remote in recieve mode until the master sends a code unique to the reote, then have the remote send it's data and wait for a successfull ACK from the master.

Or, go to something like the NRF24L01's or XBees. costs more, but much easier to ger working.
42  Using Arduino / Project Guidance / Re: Connect 2 or more MPU6050 on board arduino Uno R3 on: February 26, 2014, 02:11:55 pm
True enough.  Using the AUX cuts down on spider wiring though and cost nothing (user's choice, unless you need the guy comming in on AUX to talk to the primary ).
43  Using Arduino / Project Guidance / Re: Connect 2 or more MPU6050 on board arduino Uno R3 on: February 24, 2014, 01:19:39 pm
Oops, sorry.  My Bad.  6050 is a 3.46V MAX device, so A0 would definitely NOT tie to +5V, but +3.3V.
However, the AUX_DA and AUX_CL are pass-throughs for putting other devices on the same I2C channel (either to talk to the 6050, or the host). And yeah, the pull-ups aren't needed.  Sorry again, was looking at the 6050 datasheet, not the breakout board.
44  Using Arduino / General Electronics / Re: analogRead not showing expected results on: February 24, 2014, 10:54:12 am
To expound upon what Tack is saying, 10K 'marked' resistors don't always measure 10K Ohms (tolerance and temp coeff).  But, Poly and James are most likely the ones with the most appropriate responses (IMHO).
45  Using Arduino / Project Guidance / Re: Second ATMega chip? on: February 21, 2014, 02:12:04 pm
I'm out'a here.

Man are they gonna jump on you.  look up code tags.
Pages: 1 2 [3] 4 5 ... 15