Show Posts
Pages: 1 ... 383 384 [385] 386 387 ... 579
5761  Using Arduino / Sensors / Re: Help with accelerometer MMA7361 on: March 16, 2012, 05:20:05 pm
Did you measure to be sure your 3.3V power is 3.3V at the chip's power and ground pins?

Are your sure your voltmeter is accurate?  I would have expected more than one or two digits.

Note: The datasheet says that at 25°C and 3.3V input the 0G outputs should be between 1.485 and 1.815.
5762  Using Arduino / Installation & Troubleshooting / Re: Schematic error in Motor Shield? on: March 16, 2012, 05:02:26 pm
I'm guessing you found some archaic datasheet that uses the term XNOR for an OR gate that inverts the inputs before OR'ing.  Today that is called a NAND gate: an AND gate with an inverted output.  They are the same thing:

A  B not-A||not-B not(A&B)
0  0        1               1
0  1        1               1
1  0        1               1
1  1        0               0
5763  Development / Suggestions for the Arduino Project / Re: EthernetIPAddress documentation error? on: March 16, 2012, 04:52:28 pm
The separators depend on context.

The IPAddress class takes four integer values, separated by commas, as arguments.

An IP address, when part of a URL character string, has four decimal values separated by periods.
5764  Using Arduino / General Electronics / Re: want to build my own power supply with pot ajustments on: March 16, 2012, 04:42:26 pm
this says its switching with 92% eff... are they lieing ? lol or is this what i would need ?
http://www.ebay.com/itm/LM2596S-DC-DC-35V-to-33V
"This listing () has been removed, or this item is not available."
5765  Using Arduino / Programming Questions / Re: Counter output to Tft on: March 15, 2012, 11:00:57 pm
Note that with all the delay() calls you'll have to release the button for more than a second for the next press to register.  Otherwise I can't spot anything obvious.  I'd get rid of the delays.
5766  Using Arduino / Project Guidance / Re: How to use a soft potentiometer with an RGB led on: March 15, 2012, 10:51:18 pm
Can you set the default for the pot?  If so, set it to the new current value each time the pot is moved.
5767  Using Arduino / Project Guidance / Re: Discharging Cap Setup on: March 15, 2012, 10:45:52 pm
More information is needed.
5768  Using Arduino / Programming Questions / Re: loop on: March 15, 2012, 10:44:45 pm
Your code only does stuff when a new button code arrives.  Look at the BlinkWithoutDelay example to see how to blink a light without using the delay() function which monopolizes the processor.  Then you'll want to have some way of remembering if the Left or Right blinker is supposed to be on.  In your blink code you would blink whichever light is supposed to be blinking and turn the other lights off.
5769  Using Arduino / Programming Questions / Re: Counter output to Tft on: March 15, 2012, 10:36:52 pm
Code:
    if(currentState != previousState)
        {
        if(currentState == 1)
            {
            counter = counter + 1;
            delay(500);
            Serial.println(counter);
            Tft.drawNumber(counter,75,150,4,BLUE);
            return;   //////// This is the mistake.  You leave the function before setting 'previousState'.
            }
       }

    previousState = currentState;
5770  Using Arduino / Programming Questions / Re: Discharging Cap Code and Setup on: March 15, 2012, 10:32:21 pm
> What is the code to discharge a capacitor?
Code:
digitalWrite(CapacitorPin, LOW);

> How is hardware setup to discharge a capacitor?
Connect the - side of the capacitor to Ground and the + side of the capacitor to a pin.

> I have the Arduino measuring voltage on ADC pin 0.
Interesting.  Was that supposed to be relevant to your questions?
5771  Using Arduino / General Electronics / Re: Rugged stretch-resistant / headphone wire - where to buy it? on: March 15, 2012, 10:28:07 pm
Here's some fine (0.89"/2.26mm) 2-conductor cable rated for 150v:  http://search.digikey.com/us/en/products/C3105.41.86/C3105-1000-ND/11756
5772  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).
5773  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
5774  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.
5775  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);   
}
Pages: 1 ... 383 384 [385] 386 387 ... 579