Show Posts
Pages: 1 2 [3] 4 5 ... 590
31  Using Arduino / LEDs and Multiplexing / Re: Arduino + Shift register + 4 digit 7 seg. display and only can get 8 to display? on: August 13, 2014, 06:07:07 pm
You should not have current limiting resistors on the common (digit) pin, only on the individual (segment) pins.

If my understanding is correct, you have the common anode for one digit connected to +5V (through an unnecessary resistor).  The cathodes for the segments go through a current limiting resistor to the outputs of the 74HC595 shift register.  Taking the pins LOW should turn on the connected segment.  Perhaps the shift register isn't getting power and all of the segments are being grounded through the chip.  That would cause all the segments to light up.

Are you sure you have MR (Master Reset) pulled HIGH and OE (Output Enable) pulled low?
32  Using Arduino / Project Guidance / Re: 5V stepper motor doesn't spins! on: August 13, 2014, 05:21:53 pm
Often this means that two of your stepper motor wires are swapped.
33  Using Arduino / Programming Questions / Re: Reading several onewire sensors on: August 13, 2014, 05:17:50 pm
It might work better if you selected devices by their 64-bit address rather than their index.  I don't know if either library is smart enough to only index devices that it understands.
34  Using Arduino / Networking, Protocols, and Devices / Re: SPI conflict with Uno, Ultimate GPS Logger, and Thermocouple Multiplexer on: August 13, 2014, 05:13:22 pm
Which CS pin do you have selected on the Thrermocouple Mux: 8, 9, or 10?

Does the logger shield use Pin 4, 5, 6, or 7 for anything?
35  Using Arduino / Sensors / Re: How to use Ultrasonic sensor with IR control on: August 13, 2014, 04:56:28 pm
controle() is incorrect.  It checks to see if ANOTHER IR message has arrived and it only gets called when a message has arrived.

Remove this part:
Code:
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);

    armazenavalor = (results.value);

and remove the matching close-bracket.  Use the value that loop() saved in armazenavalor.

You can also take out this part because it is already done in loop():
Code:
    if (armazenavalor == 0xFF9867) //Verifica se a tecla 1 foi acionada
    {
      sensor();
    }
36  Using Arduino / Project Guidance / Re: Sending data to 2 ports without delay on: August 13, 2014, 04:48:04 pm
Suppose I want to send 32bits of data via SPI using the above method.
How would this be done?

Call SPI.transfer() for each of the four bytes in your 32-bit value.
37  Using Arduino / General Electronics / Re: Arduino Leonardo unable to power my motor? on: August 13, 2014, 04:41:40 pm
So I should connect the B to pin 2 in my case and the C to the power supply and E to the Arduino GND pin next to the 5V pin. I have a few BC547 PNP transistors that I scraped of old electronics. This should turn on the motor when setting pin 2 to high right?

Two changes:
    Use an NPN transistor, not PNP.
    Since the Base/Emitter junction acts like a diode to Ground you should add a resistor between Pin 2 and Base.  About 100-200 Ohms.
38  Using Arduino / Programming Questions / Re: FTDI usb-serial VS arduino uno usb-serial converter on: August 13, 2014, 07:12:45 am
My best guess would be this file from Arduino 1.0.5:

hardware/arduino/firmwares/atmegaxxu2/Arduino-COMBINED-dfu-usbserial-atmega16u2-Uno-Rev3.hex
39  Using Arduino / General Electronics / Re: Arduino Leonardo and Wireless SD Shield - Motor not getting power? on: August 13, 2014, 06:54:10 am
How would you explain the fact that it does work on the 3.3V and 5V output pin of the board? Do they give more amps?

Yes.  The 5V pin can supply over 400 mA on USB and over 900 mA when externally powered with 7-12V.  Trying to draw more than 40 mA from an output pin can damage the output transistors.
40  Using Arduino / Microcontrollers / Re: ATmega168 Programming: Which board to use? on: August 13, 2014, 06:51:48 am
Since you appear not to be using any Arduino libraries you might want to try the AVRFreaks forum.  They cover Atmel AVR processors of all kinds.  They can help you with non-Arduino hardware and build tools.

avrfreaks.net
41  Using Arduino / Microcontrollers / Re: ATmega168 Programming: Which board to use? on: August 12, 2014, 06:25:45 pm
By "flash the chip" do you mean "Burn Bootloader" or  "Upload using Programmer"?  Those talk to the hardware directly.   You might be able to work around that problem by changing:
Code:
pro.build.mcu=atmega168
to
Code:
pro.build.mcu=atmega168pa
in boards.txt.

If you are trying to upload using the normal USB cable you should not be getting that error since the Arduino bootloader should  return the ATmega168 signature even when running on an ATmega168PA.
42  Using Arduino / General Electronics / Re: Arduino Leonardo and Wireless SD Shield - Motor not getting power? on: August 12, 2014, 06:12:34 pm
An Arduino output pin can only source 40 mA without damage (20-30 mA is a reasonable safe limit).  This means that they can't drive any but the smallest of motors (like a cellphone vibrator motor).  For anything larger than that you would generally use a transistor switch:

http://www.electronics-tutorials.ws/transistor/tran_4.html
43  Using Arduino / General Electronics / Re: Arduino Leonardo and Wireless SD Shield on: August 12, 2014, 01:01:50 pm
Does your shield use Pin 2 for anything?  Look at the documentation.

Hard to tell if you have forgotten anything without seeing the sketch.
44  Using Arduino / Sensors / Re: How to use Ultrasonic sensor with IR control on: August 12, 2014, 12:58:31 pm
I think your main problem is in loop():
Code:
void loop() {
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);

    armazenavalor = (results.value);
    if (armazenavalor == NULL)
    {
      sensor();
    }
    if (armazenavalor == 0xFFA25D)
    {
      controleIR();
    }
  }
}

The way it is written, it will do NOTHING unless an IR message has been received.  This will prevent the use of "sensor()".

What you probably want to do is use an IR Remote button to switch to IR mode and a different one to switch to Sonar mode:
Code:
void loop() {
  static boolean IRMode = true;  // Start in IR Remote mode

  if (irrecv.decode(&results)) {
    armazenavalor = results.value;
    Serial.println(armazenavalor, HEX);
    if (armazenavalor == SONAR_BUTTON)
        IRMode = false;
    else
    if (armazenavalor == IR_BUTTON)
        IRMode = true;
    else
    if (IRMode)
      controleIR();
   }

   if (!IRMode) {
      sensor();
    }
}
45  Using Arduino / Sensors / Re: How to use Ultrasonic sensor with IR control on: August 12, 2014, 11:38:42 am
Your sketch does not compile:
Quote
sketch_aug10a.ino: In function 'void loop()':
sketch_aug10a:54: error: 'controleIR' was not declared in this scope
Pages: 1 2 [3] 4 5 ... 590