Show Posts
Pages: 1 ... 283 284 [285] 286 287 ... 411
4261  Using Arduino / Programming Questions / Re: Interrupt program not working on: November 30, 2011, 01:51:50 am
Use this circuit:
http://www.arduino.cc/en/Tutorial/button
4262  Using Arduino / Installation & Troubleshooting / Re: Replacement for Blown D1 Diode on Arduino Nano on: November 30, 2011, 01:18:56 am
Diodes are cheap.  Would you rather a more expensive component on the board die instead?
4263  Using Arduino / Programming Questions / Re: Does my bootloader support watchdog timer? on: November 30, 2011, 01:02:07 am
Maybe I am missing something, but why would the bootloader have anything to do with the watchdog timer?
4264  Using Arduino / Programming Questions / Re: Example of interrupt-based version of reading serial port on: November 30, 2011, 01:00:08 am
Timing this, it shows that the reaction time to turn the LED on, after the third byte has arrived, is 19.375 uS. This then is reacting 2580 times as fast as you need it to, so that is plenty fast enough. Plenty of time in fact to be doing other things as well.
Nick, you continue to impress me with the steps you take to help people in this forum. 

Nice work!
4265  Using Arduino / Programming Questions / Re: Interrupt program not working on: November 30, 2011, 12:44:51 am
Interrupt 0 uses pin 2.  What have you attached to Pin2?   Your program doesn't enable the internal pull-up resistors so are you using external pull-ups (or pull-downs)?
4266  Using Arduino / Installation & Troubleshooting / Re: Problems uploading sketch from Macbook Pro on: November 30, 2011, 12:15:42 am
Try the other USB port.
4267  Using Arduino / Installation & Troubleshooting / Re: Replacement for Blown D1 Diode on Arduino Nano on: November 30, 2011, 12:13:55 am
Why would replacing it with one with a higher rated current make you "better off"?
4268  Using Arduino / Programming Questions / Re: I2C lcd on: November 29, 2011, 11:54:04 pm
Download this Liquid I2C library:
http://hmario.home.xs4all.nl/arduino/LiquidCrystal_I2C/

Unzip it and put it in your libraries folder.  If you don't have a libraries folder, where your other Arduino sketches are stored, create one.
4269  Using Arduino / LEDs and Multiplexing / Re: LOL Shield- Swap out the LEDs? on: November 29, 2011, 11:11:32 am
As long as you don't draw more than 30mA from I/O pin at any given moment, there is no reason you couldn't run wires and use larger LEDs.
4270  Using Arduino / General Electronics / Re: Current for Arduno Uno on: November 29, 2011, 10:58:35 am
You misunderstand how current works and how it is rated.  Current is drawn, not pushed.  Power supplies provide a source of current, devices draw from that source.  So your 100mA sensor will draw 100mA from a 500mA source.

The Uno, with nothing connected, draws on the order of 30 or 40mA.

Are you going to be using lights (LEDs?) for the scoreboard?  If so, that's probably the biggest concern for current.
4271  Using Arduino / Programming Questions / Re: Example of interrupt-based version of reading serial port on: November 29, 2011, 01:15:15 am
But having a function called automatically no matter where your code is in it's execution is a better way to go.
Says who?  I don't agree with that statement at all.  Again, unless there is a critical need to act immediately on a character why not let the built-in interrupts handle it?  Nick mentioned a buffer.  Incorrectly he called it a 32-byte, when it is in fact 128 bytes.  Regardless, interrupts already handle incoming bytes. 

As long as interrupts are not disabled in loop(), everything just works nicely and loop() doesn't get so cluttered.
One option is:
Code:
checkSerial();
That doesn't look very cluttered to me.
4272  Using Arduino / Programming Questions / Re: Example of interrupt-based version of reading serial port on: November 29, 2011, 12:35:27 am
There doesn't seem any obvious way to create an interrupt handler to handle incoming serial data, without polling.

Common conventions says you should spend as little time as possible in a ISR.  Typically you use a ISR to set a flag.  Which as Nick pointed out, is what Serial.Available() already provides.

What is it you are doing that timing is so critical you need to see every serial character as it comes in?
4273  Using Arduino / Project Guidance / Re: Recursive video on: November 28, 2011, 11:54:00 pm
I'm unsure how this relates to Arduino.
4274  Using Arduino / General Electronics / Re: Soldering for the beginner. on: November 28, 2011, 11:43:37 pm
Also, caffeine doesn't help. smiley
I find that beer works though.  Although, a calibrated amount is required.  It doesn't take too many to get to the point of diminishing returns.
4275  Using Arduino / Programming Questions / Re: sleep mode on: November 28, 2011, 08:47:47 pm
Keep in mind that sleep mode only puts the ATmega328 to sleep, not the Arduino.  The Waveshield, Power LED, 8U2 (or FT232 on older boards), 5V reg, and 3V3 reg are all going to still be running.  You might be saving a few millliamps while the rest of the circuit is still drawing 10s of milliamps.
Pages: 1 ... 283 284 [285] 286 287 ... 411