Show Posts
Pages: 1 ... 329 330 [331] 332 333 ... 583
4951  Using Arduino / Installation & Troubleshooting / Re: Is my Arduino broken on: July 10, 2012, 06:37:45 pm
The USB ports can only supply 500 mA (1/2 Amp).  If you draw too much current the USB port power is shut down to protect it.  Try shutting down the PC and starting it up again.
4952  Using Arduino / Networking, Protocols, and Devices / Re: bi-directional ethernet (TCP) on: July 10, 2012, 06:21:16 pm
I want one so that the uno can send data out when it wants (uno as client) and I want one so that the uno can be sent information when required (uno as server).

That's not quite the definition of client and server.  The naming depends on which side initiates the connection request.  It's the Client that sends a connection request and a Server that accepts a connection request.  Once the connection has been established then either end can send at any time.

To accept connections, use an EthernetServer object.  To initiate connections, use an EthernetClient object.
4953  Using Arduino / Audio / Re: midi multichannel on: July 10, 2012, 04:44:18 pm
Aren't there other/more timers you can use/utilize?

The ATmega328P has three hardware timer/counters.  The Tone library uses one timer per Tone.

The processor on the Arduino Mega has 6 timers.
4954  Using Arduino / Project Guidance / Re: holding ckt causing problem!!!! on: July 10, 2012, 04:40:52 pm
What are you using for the variable voltage source?  Hope it's not a PWM pin since they are switching between 0V and 5V very quickly.
4955  Using Arduino / Microcontrollers / Re: AVR ISP mkII bootloader being deleted on each programming run on: July 09, 2012, 03:27:11 pm
Usually when you can only use the bootloader once it means the Autoreset feature is not properly implemented.  Try a manual reset when you see the "Binary sketch size:" message.  If that works you need to fix your autoreset hardware.
4956  Using Arduino / Programming Questions / Re: Question about pins on: July 09, 2012, 02:50:34 pm
On the switch, that can connect from a pin to ground. The internal pullup is used to hold the pin High when the switch is open, and the switch connects the pin to ground when closed. No other resistors are needed.

Many people writing examples seem to think it's wrong for an input pin to go from HIGH to LOW when you push a button.  They insist on adding a pull-down resistor (to make the pin LOW when the switch is open) and a switch between the pin and +5V (to make the pin HIGH when the button is pressed).   As CrossRoads says you can avoid the external pull-down resistor buy reversing the action of the button and using the internal pull-up resistor.

In answer to another question: Yes, you could use 3.3V instead of 5V for the switch.  The voltage is high enough to register as HIGH on a 5V input.  The only advantage is that the external pull-down resistor will use 0.33 milliwatts instead of 0.5 milliwatts while the button is pressed.  Not a significant advantage.
4957  Using Arduino / Programming Questions / Re: Help: debug two attachInterrupt(). Is there a limitation?? on: July 09, 2012, 09:42:40 am
If Pin 3 is left open/floating it is possible that a signal on the adjacent Pin 2 is leaking in.  Try connecting Pin 3 to Ground.
4958  Using Arduino / Project Guidance / Re: holding ckt causing problem!!!! on: July 09, 2012, 08:54:52 am
As long as Enable is LOW the input voltage is connected to one of the outputs.  If you change the input voltage without setting Enable HIGH you will be connecting the new voltage to the currently addressed capacitor.  If you change the address pins without setting Enable HIGH you will be connecting the old voltage to the newly addressed capacitor, and if you need to change more then one address bit there will be multiple intermediate capacitors.
4959  Using Arduino / Project Guidance / Re: holding ckt causing problem!!!! on: July 09, 2012, 08:03:45 am
Do you set the Enable pin HIGH (disabled) before you change address bits?

4960  Using Arduino / Sensors / Re: AS5040 rotary encoder and quadrature output on: July 09, 2012, 07:47:05 am
Maybe the magnet is off-center.  You have to get it centered within 0.25 mm.

Maybe the chip you got was programmed for 9-bit resolution (one of the options).
4961  Using Arduino / Programming Questions / Re: Question about pins on: July 08, 2012, 08:31:55 pm
0 through 13 are digital I/O pins.  Use pinMode() to set them as INPUT or OUTPUT.  Use digitalRead() for INPUT and digitalWrite() for OUTPUT.

A0 through A5 (also known as 14 through 19) are analog input pins.  Use analogRead() to get a number from 0 to 1023 representing a voltage from 0V to 5V.  They can also be used as digital pins (pinMode, digitalRead, digitalWrite).

Some pins have specialized uses:
  0,1 is for serial I/O.  That's how Serial.print() gets to your PC via the USB-to-Serial converter.
  10, 11, 12, and 13 double as the SPI interface, used to communicate with some chips.
   A4 and A5 double as the I2C/TWI interface, used to communicate with other chips.

The GND (ground) pins are all connected.  They provide the 0V reference from which other voltages are measured.

The Vin pin connects to the power input jack.  It can be used to put power (7-12V) into the Arduino or tap off power provided through the power jack.

The 5V pin connects to the regulated 5V power line.  You can put regulated 5V in through that pin to power the Arduino or, if the Arduino is powered from USB, the power jack, or Vin, you can get 5V from the pin for your other chips.  Limit that to about 400 mA.

The 3.3V pin is for getting a small quantity (50 mA?) of 3.3V power for other chips.

The RESET pin, when connected to Ground, will force your Arduino to reset.

The Aref pin can provide a reference voltage for the analog inputs.  Leave it unconnected.
4962  Using Arduino / Project Guidance / Re: Guidance on Debugging Bluetooth + SPI Interoperation Issue on: July 08, 2012, 08:15:00 pm
Code:
Your sketch doesn't compile so it's hard to say what is going wrong.

[quote]
sketch_jul08b.cpp: In function 'void setup()':
sketch_jul08b:4: error: 'RxD' was not declared in this scope
sketch_jul08b:5: error: 'TxD' was not declared in this scope
sketch_jul08b:8: error: 'SPI_SETUP' was not declared in this scope
sketch_jul08b:11: error: 'Accelerometer_Setup' was not declared in this scope
sketch_jul08b:16: error: 'setupBlueToothConnection' was not declared in this scope
sketch_jul08b.cpp: In function 'void loop()':
sketch_jul08b:22: error: 'period' was not declared in this scope
sketch_jul08b:28: error: 'xAcc' was not declared in this scope
sketch_jul08b:30: error: 'yAcc' was not declared in this scope
sketch_jul08b:33: error: 'blueToothSerial' was not declared in this scope
sketch_jul08b:34: error: 'recvChar' was not declared in this scope
sketch_jul08b.cpp: In function 'void getData()':
sketch_jul08b:41: error: 'readVal' was not declared in this scope
sketch_jul08b:44: error: 'xAcc' was not declared in this scope
sketch_jul08b:44: error: 'xOffset' was not declared in this scope
sketch_jul08b:45: error: 'yAcc' was not declared in this scope
sketch_jul08b:45: error: 'yOffset' was not declared in this scope
sketch_jul08b.cpp: In function 'void getCalibration()':
sketch_jul08b:53: error: 'readVal' was not declared in this scope
sketch_jul08b:54: error: 'sumx' was not declared in this scope
sketch_jul08b:54: error: 'xAcc' was not declared in this scope
sketch_jul08b:55: error: 'sumy' was not declared in this scope
sketch_jul08b:55: error: 'yAcc' was not declared in this scope
sketch_jul08b:56: error: 'sumz' was not declared in this scope
sketch_jul08b:56: error: 'zAcc' was not declared in this scope
sketch_jul08b:58: error: 'period' was not declared in this scope
sketch_jul08b:61: error: 'xOffset' was not declared in this scope
sketch_jul08b:61: error: 'sumx' was not declared in this scope
sketch_jul08b:62: error: 'yOffset' was not declared in this scope
sketch_jul08b:62: error: 'sumy' was not declared in this scope
sketch_jul08b:63: error: 'zOffset' was not declared in this scope
sketch_jul08b:63: error: 'sumz' was not declared in this scope
4963  Using Arduino / Programming Questions / Re: avrdude: verification error; content mismatch on: July 08, 2012, 04:39:02 pm
Too many 0xFF's.  AVRDUDE, the program that uploads sketches, assumes that memory is full of 0xFF (has been erased).  If it sees that a page to be written is full of 0xFF it doesn't bother to send it.  Unfortunately the Arduino upload doesn't do a Chip Erase first so whatever garbage was left in FLASH is still there for the verification.

I don't know how to work around the problem.
4964  Using Arduino / Programming Questions / Re: Temperature control fans on: July 08, 2012, 04:33:00 pm
Perhaps a PID control loop would produce better results than an arbitrary 5-second burst of full speed.  See: http://arduino.cc/playground/Code/PIDLibrary

The PID loop will take the current temperature and setpoint temperature as inputs and will produce the PWM value for the fans as output.  It will track the difference between the current temperature and setpoint and adjust the fans so that the temperature stays close to the setppoint.  As the temperature approaches the setpoint (but still below it) the fans will come on to try to prevent the temperature from going above the setpoint.  As the temperature drops the fans will slow down.
4965  Using Arduino / Programming Questions / Re: Creating a Library Help? on: July 08, 2012, 02:04:13 pm
Inside the BombDisplay object you declare a function called setRegisterPin but you don't define the BombDisplay::setRegisterPin() function.  You define a global "setRegisterPin" function but that's not the same as the one declared in BombDisplay.
Pages: 1 ... 329 330 [331] 332 333 ... 583