Show Posts
Pages: 1 ... 285 286 [287] 288 289 ... 542
4291  Using Arduino / Project Guidance / Re: pan and tilt system problem on: July 14, 2012, 06:10:17 pm
A single servo under load might draw more than 1 Amp.  An Arduino running off of USB only has about 400 mA (0.4 Amps) of 5V to spare!  Run off a 7-12V supply it has about 900 mA to spare (0.9 Amps).  Sometimes a single small servo will work, even on USB, but you can't count on it.

My understanding of servo power requirements is that the motors are specified at 6V and can work at 5-7V.  The Arduino regulator needs 7V minimum.  If you can get a hefty 7V power supply you can use it for both the Arduino (Vin or power jack) and servos.  If you can get a hefty REGULATED 5V supply you can use that for both Arduino (5V pin) and servos.

There are three options:  

1)  If you can get a hefty 7V power supply you can use it for both the Arduino (Vin or power jack) and servos.

2)  If you can get a hefty REGULATED 5V supply you can use that for both Arduino (5V pin) and servos.

3) If you can get a hefty 6V supply you can use that to power the servos but you will need a separate power source for the Arduino (USB or 7-12V in the power jack).

In all cases, 'hefty' means about 1A per simultaneous servo.  If you have 10 servos and only one moves at a time you can probably use a 1A supply.  If you move all 10 together you may need a 10A power supply.

Most multimeters can measure current and many have a special 10A jack for measuring high currents.  You put the meter between the load (servos) and the power source.
4292  Using Arduino / Programming Questions / Re: IR remote library error: uint8_t does not name a type. on: July 14, 2012, 05:53:33 pm
In most cases of using a  version 022 library in 1.0 the very first error you would get would indicate that Wprogram.h was not found.  Did you not get that error?

ALWAYS fix the first error and re-compile.  Many times all the other errors cascaded from the first. smiley
4293  Using Arduino / Programming Questions / Re: Finger switch recognize if going up or down on: July 14, 2012, 05:40:25 pm
Code:
int readSwitch()
{
  return
    digitalRead(q1) +
    digitalRead(q2)<<1 +
    digitalRead(q4)<<2 +
    digitalRead(q8)<<3;
}

Then you can compare the new value to the old.  Unfortunately you need to compare modulo 10:
Code:
int switchChange()
    {
    static int oldValue = 0;

    int newValue = readSwitch();
    if (newVale == oldValue)
        return 0;

    int returnValue = newValue - oldValue;

    if (returnValue < -6)
        returnValue += 10;  // Switch probably wrapped around from 9 to 0
    else
    if (returnValue > 6)
        returnValue -= 10;  // Switch probably wrapped from 0 to 9;

    oldValue = newValue;
   return returnValue;
   ]
4294  Using Arduino / Programming Questions / Re: IR remote library error: uint8_t does not name a type. on: July 14, 2012, 05:14:01 pm
Did you change the include of Wprogram.h to Arduino.h?

http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html

"Note for Arduino 1.0
I haven't had time to update the library yet, but several helpful people have told me that to use the library with Arduino 1.0, you need to change
#include <WProgram.h>
to
#include <Arduino.h>
in IRRemoteInt.h.
4295  Using Arduino / LEDs and Multiplexing / Re: 16x16 Display on: July 14, 2012, 02:44:30 pm
5V - 2V = 3V
3V / 220Ω = 0.013A (13 mA)

That would be good.  You could go as low as 150Ω (20 mA).
4296  Using Arduino / Microcontrollers / Re: Powering ATmega328 without voltage regulator? on: July 14, 2012, 02:14:41 pm
Its fine as long as the power supply is regulated.

Heck, the power doesn't even have to be regulated.  It just has to be fairly steady and in the acceptable range.  You can use three AA batteries (about 4.5V).

Note: if you use a voltage below 3.8V you should switch to a lower clock speed  (8 MHz rather than 16 MHz).
4297  Using Arduino / Installation & Troubleshooting / Re: I cant upload programs to my arduino on: July 14, 2012, 01:42:56 pm
Does the Arduino serial port appear under Tools->Serial Port?  If not, check that you have the drivers installed.

Did you select the right port under Tools->Serial Port?

Did you select "Arduino Uno" under Tools->Board?
4298  Using Arduino / LEDs and Multiplexing / Re: Making a 7 segment display make an 8. on: July 14, 2012, 01:38:01 pm
does not work.

Could you be more specific?
4299  Using Arduino / Programming Questions / Re: Sending IR hash codes on: July 14, 2012, 10:46:28 am
No, you can't send hashed IR codes.  They are used for recognizing received IR codes.

To send codes that are not Sony, NEC, RC5, or RC6 you have to send the RAW codes:

  void sendRaw(unsigned int buf[], int len, int hz);
4300  Using Arduino / Audio / Re: cheap sound module: what version is this? on: July 14, 2012, 10:20:52 am
as stated on arduino site they can be used as digital output as well
Quote
While the main function of the analog pins for most Arduino users is to read analog sensors, the analog pins also have all the functionality of general purpose input/output (GPIO) pins (the same as digital pins 0 - 13).
Consequently, if a user needs more general purpose input output pins, and all the analog pins are not in use, the analog pins may be used for GPIO.
http://arduino.cc/en/Tutorial/AnalogInputPins

One odd quirk you may come across is that on the SMD versions of the ATmega processor where you get A6 and A7 pins, those two CAN'T be used as digital pins.
4301  Using Arduino / Installation & Troubleshooting / Re: Problem about Uploading Arduino Ethernet Board on: July 14, 2012, 10:16:02 am
If your USB-to-Serial adapter has a 9-pin D conector as is shown in your diagram it is probably using RS232 logic levels which are not the same as TTL logic levels.  You should probably invest in a USB-to-TTL (5V) Serial cable such as:

http://www.trossenrobotics.com/store/p/6406-FTDI-Cable-5V.aspx
http://www.foogra.com/products/43320/
http://serialstuff.amazonwebstore.com/USB-to-5v-TTL-Header-Like/M/B004LC28G2.htm
4302  Using Arduino / Sensors / Re: NEED OF HELP!!!! CAN I USE MY 5VOLT CNC OUTPUT AS SENSOR! (SOLVE) on: July 14, 2012, 10:05:17 am
If it's a signal that switches between (near) 0V and (near) 5V you can read it with a digitalRead(). Make sure that the signal ground is connected to the Arduino ground.
johnwasser thanks i finally get it and try and its working the only problem now is the code, i think there is something wrong about my code.
if there is somebody out there that can help me...

It will be hard to help unless you show your code.
4303  Topics / Device Hacking / Re: Keyboard from old cash register. on: July 13, 2012, 01:41:56 pm
Thanks, it headed me in the right direction.
Now i just need a way to hookup the flexible cables.

Can you remove the original connector from whatever board the keypad plugged into?

I find a propane torch to melt the solder and a sharp rap on a hard surface will nock most connectors off a board. smiley
4304  Using Arduino / Microcontrollers / Re: Ardu Pilot Mega on: July 13, 2012, 01:36:18 pm
If you look at the documentation for Serial (linked a few replies back) you can read that Serial.read() returns an integer.  If there are no characters available it returns a -1.

A boolean variable can only contain 0 or 1 (false or true) so it won't work to store an integer.

You don't need to make a variable global unless it is shared bt more than one function.

Serial.print() will send a number as a series of digits: '-1', '124'.  Serial.write() is the way to send a single character.

Code:
void setup() {
  Serial.begin(9600);
  Serial2.begin(9600);
}

void loop() {
    int in = Serial2.read();
    is (in != -1)
        Serial.write(in);
    delay(200); 
}
4305  General Category / General Discussion / Re: what are these pin spots for? on: July 12, 2012, 12:30:36 pm
The schematic shows them as connected to PORTB Bits 4-7.  Not much on those pins except PCINT4-7
Pages: 1 ... 285 286 [287] 288 289 ... 542