Show Posts
Pages: 1 ... 15 16 [17] 18 19 ... 29
241  Using Arduino / Programming Questions / Re: Multiple random LED's on: March 11, 2013, 01:28:34 am
This is from the project I'm working on. It uses shift registers and shifter library. Basically everything is in arrays. The code is still very much in development so it could use a bit of cleaning up and optimization, but it works.

void neonFlicker(int firstPin, int lastPin) //  Receives first and last pin number for the block to be assigned neonFlicker effect
  for (int i = firstPin - 1; i <= lastPin -1 ; i++)       //  Iterates between the pins set in loop, sets addresses of pins to 1-8 per shift register, and not 0-7
    currentMillis = millis ();                   //  Updates current time
    if (ledState [i] == 0 &&
      currentMillis - previousMillisArray [i] > neonFlickerArray [i] &&             //  Checks if it is time to flicker
      flickerDelay [i] <= currentMillis) //  Checks if it is time to turn on one of the outputs on the shift register.
      shifter.setPin(i, HIGH);                                                             //  If it is time for the pin in question, it is turned on.
      previousMillisArray [i] = currentMillis;                                             //  Updates corresponding field in the time array.
      ledState [i] = 1;                                                                       //  Changes the state ledState
      neonFlickerArray [i] = (random (2, 200));                                        //  Sets new flickering delay (time the light is turned on)
    if (ledState [i] == 1 && currentMillis - previousMillisArray [i] > neonFlickerArray [i])    //  Checks if it is time to turn off one of the outputs on the shift register.
      shifter.setPin(i, LOW);                                                             //  If it is time for the pin in question, it is turned off.
      previousMillisArray [i] = currentMillis;                                               //  Updates corresponding field in the time array.
      ledState [i] = 0;                                                                           //  Changes the state ledState
      neonFlickerArray [i] = (random (2, 4000));                                       //  Sets new flickering delay (time the light is turned off)
242  Using Arduino / Project Guidance / Re: Nikon D40 timelapse photos - Guidance ! on: March 10, 2013, 11:56:05 am
The instructables project you linke is an infra red remote trigger. Do you want to go down that path or do you want a wired device?

If you want wired a small relay, a reed switch, a transistor or an optocoupler can do the trick.
243  Using Arduino / Project Guidance / Re: arduino with relay shields on: March 10, 2013, 08:30:18 am
Are you using Google translate to translate from German? If yes, then posting on German section might be a good idea.,31.0.html

As for your question, if I understood you correctly then yes, you can use Arduino to control multiple relays based on a preprogrammed program or based on real time decision making.
244  Using Arduino / Project Guidance / Re: Power Question on: March 10, 2013, 04:51:55 am
AC mains power is being split all over your house. No problem there.
245  Using Arduino / Project Guidance / Re: high false value on: March 10, 2013, 04:36:21 am
Sounds like floating connections.
246  Using Arduino / Project Guidance / Re: Image processing question/ object detection on: March 10, 2013, 02:22:05 am
Why not use a Raspberry Pi for image processing?
247  Using Arduino / Programming Questions / Re: if loop servo motor light sesnor ! on: March 09, 2013, 05:03:35 pm
You could use a LDR, map the values it gives to the range and positions of the servo you want to actuate and use myservo.write function with the mapped variable so you have smooth transition and not sudden jumps.

What motor do you have?
248  Using Arduino / Project Guidance / Re: Measuring Vertical Distance with Two Accelerometers on: March 09, 2013, 01:37:26 am
If you can get it to work on one, I don't see the problem of using two. Just add (or subtract) distances measured by those two.

However, I think the accuracy of this contraption will not be something you'll be happy about, especially as the time goes by.
249  Using Arduino / General Electronics / Re: Need help with 9 servos. on: March 07, 2013, 03:42:19 pm
Start by reading this

and this

and this

Then this
250  Using Arduino / Programming Questions / Re: Theoretical based Question on the delay() function on: March 06, 2013, 12:25:38 pm
But does it happen in this or parallel reality? If it happens in this reality, what happens if you unplug power after the LED blinks, but before the command is sent?
If it happens in a parallel reality, that would explain why my code seldom works. The other mes are messing with me me.
251  Using Arduino / Project Guidance / Re: airsoft gun motor causing servos to twitch on: March 06, 2013, 12:09:38 pm
If you want specifics, you better start giving some.
What motor was originally installed and what capacitor?
What currents were involved?
What motor dis you install?

The solution might be simple, but none of the experts you hope to come are psychic, well most of them in any case.
252  Using Arduino / Installation & Troubleshooting / Re: noob thicko on: March 06, 2013, 12:56:34 am
So you didn't check if the port selected in the IDE matches the one indicated by ports section of device manager?
You haven't acknowledged trying the rest of suggestions. Have you tried them all?
253  Using Arduino / General Electronics / Re: Do I need to use a motor shield to activate a 12 VDC linear actuator? on: March 06, 2013, 12:43:46 am
Link you provided says the motor can draw up to 10 A, so you can't power it directly from Arduino. Your options are either a motor shield which can provide that current for both actuators at the same time, an off the shelf motor driver, or a custom built H bridge.
254  Using Arduino / Programming Questions / Re: Programming better buttons on: March 05, 2013, 01:54:41 pm
Search debounce.
255  Using Arduino / Project Guidance / Re: Automate start/stop of a power generator on: March 05, 2013, 12:04:46 pm
You hook up a sensor to monitor the whether there is power in the mains. You cut the incoming mains line immediately after that sensor and put a relay on it.
The line from the generator is also connected via relay to the network you want powered.
When the sensor detects there is no power in the mains it decoupled the mains relay, starts up the generator and closes the generator relay. When the mains receive the power, the sensor again sends the signal, the generator is turned off, generator relay decoupled and the mains relay activated.
Pages: 1 ... 15 16 [17] 18 19 ... 29