Show Posts
Pages: 1 ... 411 412 [413] 414 415 ... 606
6181  Using Arduino / General Electronics / Re: want to build my own power supply with pot ajustments on: March 15, 2012, 10:19:10 pm
If your HP Printer power supply or your PC power supply is a switch-mode supply, you MAY be able to make the output adjustable if they have an adjustable switched-mode regulator.  Open it up and look for numbers on the chip(s).
6182  Using Arduino / LEDs and Multiplexing / Re: 32 LED control with Arduino UNO on: March 15, 2012, 10:11:43 pm
You can use the BlinkWithoutDelay example to toggle a variable between 1 and 0 every 'n' milliseconds without using the delay() function.  That can be used to do the blinking, assuming the blinking LED's all blink at the same rate.

You can wire the LED's in any order you like.  Let's say the steady Hour lights are 0-11, the blinking ones are 12-23, the steady 1/4 Hour ones are 24-27 and the blinking ones are 28-32.  You can figure out which of the four shift registers each bit is in by dividing by 8.  The result will be 0-3.  The remainder when dividing by 8 (% smiley-cool is the index within the register.

I would keep an array of four bytes to hold the flags representing each light.  Start by setting them all to 0 (== LOW).

Then get the current time (Hour and Minute).  Divide the Minute by 15 to get QuarterHour.  Set the bit for (Hour-1) {assuming hours are 1-12} HIGH and bit for 11+Hour (or 12+Hour-1) to the current blink value (0 or 1).  Set the bit for 24+QuarterHour to HIGH and the bit for 27+QuarterHour to the current blink value.

Use shiftOut() to send the four bytes to the four shift registers.

Repeat.  smiley
6183  Using Arduino / General Electronics / Re: want to build my own power supply with pot ajustments on: March 15, 2012, 05:43:31 pm
You can buy adjustable regulators with output current limits of 5 to 10 Amps at DigiKey.com.  They have 9 pages of options.  Use parametric search to find devices that meet your requirements.
6184  Using Arduino / Programming Questions / Re: Coding to control 74HC595 on: March 15, 2012, 05:38:16 pm
The caret symbol ('^') does bitwise exclusive-or and not exponentiation as you seem to expect.  You can get the effect you want with the left-shift operator ('<<').

For bits/flags you might want to use the 'bool' type rather than the 'int' type.  Bool values will always be 0 or 1.
Code:
void Control595(bool a, bool b,bool c,bool d,bool e,bool f,bool g,bool h)
{
int j = a+b<<11+c<<2+d<<3+e<<4+f<<5+g<<6+h<<7;

shiftOut(dataPin, clockPin, LSBFIRST, j);   
}
6185  Using Arduino / Programming Questions / Re: IR Remote Help on: March 15, 2012, 05:03:00 pm
Quote
I got the code to work but when I press a button it gives me code. However when I hold down any button it gives me the same code.
Holding a button down should send the same value over and over, until you release the button.
... but it won't necessarily be a different code for each button.  Some remotes have a "repeat that last button" code that they send repeatedly when a button is held down.  They use the same repeat code for all buttons.  Your sketch will have to remember what button was last pressed and use the 'repeat' code to know if the button is still being held down.  Since there is no 'button up' code you will need a timer to determine if the button is no longer being pressed (it has been more than 'n' milliseconds since the last 'repeat' code arrived.)
6186  Using Arduino / Installation & Troubleshooting / Re: DFRduino RoMeo V1.O on Mac OSX v 10.7 on: March 15, 2012, 04:53:21 pm
Install the latest FTDI Virtual Com Port drivers: http://www.ftdichip.com/Drivers/VCP.htm
6187  Using Arduino / LEDs and Multiplexing / Re: 32 LED control with Arduino UNO on: March 15, 2012, 04:50:48 pm
When you have more LED's than output pins (as you do) you get to decide between more output pins or a matrix.  For more output pins you would probably want shift registers.  Four 8-bit registers would work four your design.  For each output pin you will need a resistor to limit the current going to the LED.  Also make sure your shift register outputs can handle the current required by your LED (typically 20 mA).

If this is to be a clock and you want to keep fairly accurate time for mare than a few hours, be sure to get either a RealTimeClock chip or a source of accurate time information (GPS or Internet access).
6188  Using Arduino / Project Guidance / Re: Help me with communication between Arduino with Wavecom Q2303A GSM modem!:) on: March 15, 2012, 02:49:38 pm
i have tried 115200 on hyperterminal,i can't see anytime i type in hyperterminal.Instead when i choose 9600,i was able to send AT command to Gsm modem.Weird right?

Were you able to get responses back?
6189  Using Arduino / Programming Questions / Re: loop for 8x8 matrix on: March 15, 2012, 11:13:36 am
How many frames of animation?  Do all frames display for the same amount of time?
6190  Using Arduino / Project Guidance / Re: Help me with communication between Arduino with Wavecom Q2303A GSM modem!:) on: March 15, 2012, 10:57:47 am
See section 4.1.3 of the manual.  It says the baud rate is 115200, not 9600.  Try that.
6191  Using Arduino / Project Guidance / Re: Help me with communication between Arduino with Wavecom Q2303A GSM modem!:) on: March 14, 2012, 04:10:05 pm
Since your GSM module is not responding it may not be in command mode.  Is there anything in the manual about switching to command mode?  Typically it's somethung like:
Code:
delay(1000);
gsm.write("$$$");
while(gsm.available())
    Serial.write((byte)gsm.read());
Serial.println();
6192  Using Arduino / LEDs and Multiplexing / Re: Shift register 4021 debounce or something else? on: March 14, 2012, 10:43:34 am
Same way as for any other button.  If it has been less than 'n' milliseconds since that button last transitioned from not pressed to pressed, ignore the press.
6193  Using Arduino / LEDs and Multiplexing / Re: Shift register 4021 debounce or something else? on: March 14, 2012, 09:43:54 am
If you are connecting to physical buttons you should probably include some debounce logic.
6194  Using Arduino / Project Guidance / Re: Arduino Bill Of Materials on: March 14, 2012, 09:28:39 am
Does it have to be the official "Arduino Ethernet" or will any Ethernet-capable Arduino clone work?

http://code.google.com/p/etherduino/wiki/BOM
6195  Using Arduino / Project Guidance / Re: Information System setup help (encoder, reset, switch, display) on: March 14, 2012, 07:18:58 am
The problem may be that Serial.print() takes a significant amount of time so you may be missing pulses.  One way to prevent that would be to use the interrupt capability of the Arduino to detect changes in one of the two quadrature inputs.  See more here: http://arduino.cc/playground/Main/RotaryEncoders
Pages: 1 ... 411 412 [413] 414 415 ... 606