Show Posts
Pages: 1 ... 219 220 [221] 222 223 ... 405
3301  Using Arduino / Programming Questions / Re: How to use analog pin A0 to trigger servo movement? on: March 31, 2012, 11:33:26 pm
If you are just looking for "high" and "low", there's no reason to use analogRead.  Just use digitalRead().

As far as your if-statements:
Code:
if (button_status == 0);
  servo_01.write(50);
if (button_status == 1023);

You don't want a semicolon there.  You almost certainly meant:
Code:
if (button_status == 0)
  servo_01.write(50);
if (button_status == 1023)
  servo_01.write(100);
3302  Using Arduino / LEDs and Multiplexing / Re: Glitching TLC5940 on: March 31, 2012, 11:05:45 pm
James.  Thanks for the correction.  I was under the impression from what I've read on-line that several TLC5940's would draw too much power from the Arduino (not to power the LEDs but for the chips themselves). 
You can't always believe what you read online.  Most people don't understand how LEDs work, let alone the TLC5940.  You have to look to the data sheet to understand.
3303  Using Arduino / General Electronics / Re: R-2R ladder ADC - is it possible? on: March 31, 2012, 07:08:08 pm
You seem to like posting your homework questions.

http://arduino.cc/forum/index.php/topic,90711.msg681243.html#msg681243

3304  Using Arduino / Project Guidance / Re: Program an Arduino with an Arduino on: March 31, 2012, 07:01:02 pm
You might want to look at:
http://baldwisdom.com/bootdrive/

You might also like the google results of something more descriptive like:
"program arduino from sd card"
3305  Using Arduino / LEDs and Multiplexing / Re: Glitching TLC5940 on: March 31, 2012, 03:52:52 pm
What is the current rating of your suppiles?  And how much current do you expect the LEDs to draw?
3306  Using Arduino / Project Guidance / Re: T9 external bluetooth keypad for iphone on: March 31, 2012, 11:26:09 am
Using the HID-based bluetooth module is crucial (and is often a key most people miss.)

Quote
"and then is there any arduino t9/keyboard library that i should look into"
Never heard of such a library and Google doesn't seem to suggest there is one either. 

Wikipedia says the technology has a patent, so the algorithm should be easy to find.
3307  Using Arduino / LEDs and Multiplexing / Re: Glitching TLC5940 on: March 31, 2012, 11:15:56 am
What I thought when I said
Quote
Would using the 12v adapter with a 7805 to power the TLC's cause more glitching, since i'd also be powering the led's with it
was that the leds wil be going on and off a lot, so i thought that might interfere with other circuits running from the same 12v source.. or won't that be a problem?
That's where decoupling capacitors can help. 

By the way, would, theoretically, adding 1000 capacitors to a power source, change anything about the output?
Adding 1000 capacitors doesn't matter.  What matters is how much capacitance you have added (or the value of each of those 1000).

You need to strike a balance between having enough and not having too much.  If you have too much, there will be a large amount of in-rush current when your circuit turns on, as all of the capacitance is charged.  (Too much has a lot of "depends" in it.  However, thousands of microfarads is probably a good line to watch.)

A 0.1uF cap near each IC's VCC is helpful to smooth out high frequency demands.  Sometimes, it may be necessary to put something larger in parallel, like a 1.0uF.  FYI, Even if you have 20 of these caps in your design, that's still less than half the capacitance as the bulk decoupling caps on the Arduino board itself.
3308  Using Arduino / Project Guidance / Re: Is an Arduino fast enough to read its own PWM lines? (cool or dumb idea) on: March 31, 2012, 09:10:45 am
Your original idea, using an interrupt to detect a change, is kind of over the top.  The way PWM works is by timer interrupts.  So PWM is already using interrupts to function.

You could do all your fancy programming with external interrupts, shift registers, transistors, etc.  Or you could buy a chip to specifically do what you want.

I'm not sure I understand the "but it is $5!"  Well, that's what it costs to make a 16 channel PWM chip.  If cost is a concern, then why use an Arduino?  Heck, why even use a microprocessor?

Personally, my time in designing, implementing, and debugging a convoluted setup is worth more than a couple of dollars.  But that's me.
3309  Using Arduino / Installation & Troubleshooting / Re: serial monitor windows closes when recompiling on: March 31, 2012, 09:06:28 am
http://arduino.cc/forum/index.php/board,21.0.html

Good luck.  As you can imagine, you aren't the first person to ask.
3310  Using Arduino / LEDs and Multiplexing / Re: Glitching TLC5940 on: March 31, 2012, 09:03:56 am
I'm a bit confused..
It appears everyone on this thread is confused.

The anodes of the led's are connected to a 12v adapter.
The arduino is powered by usb.
The TLC's are powered by the arduino.
That's critical information that should bring everyone up to speed.

Would using the 12v adapter with a 7805 to power the TLC's cause more glitching, since i'd also be powering the led's with it.
Your glitches are caused by lack of decoupling not lack of power.

You then replied:
Quote
That will increase the power dissipation in the TLC chip.
Mike made the assumption your LED's were originally connected to 5V and that you were asking about connecting to 12V.  He attempted to correct himself, but may not have been clear that is what he was saying.


Then I asked how that would happen.  smiley-razz
The TLC5940 is a constant current source.  It will drop whatever voltage is left over after the LEDs drop their forward voltage.  The amount of current that flows through each output is the same.  So if you had changed the LED's supply voltage then the TLC5940 would be dissipating more Power (Voltage * Current).   This doesn't appear to matter in your case since you have always been powering the LEDs from 12V.  The comments just caused confusion.

That's probably a bad idea.  It would be better to use something like a 7805 fed from 12v and then passed to VIN on the arduino and TLC5940's.
Don't misunderstand how the TLC5940 operates.  It does not draw current from its Vcc to power the LEDs.  It controls the amount of current allowed to flow through its outputs.  All of the "high current" comes from whatever supply the LEDs are connected to, not the TLC5940.  There's no reason to add another regulator when the Arduino's on-board regulator (or USB supply) can handle powering dozens of TLC5940s.
3311  Using Arduino / Programming Questions / Re: Linking to C++ includes, or having a Dictionary or List template? on: March 31, 2012, 08:51:23 am
Because I want pretty much an event system out of this. Pretty much, accessing sensor values or motor directions when needed. Then destroyed, once accessed.
In a microprocessor, data like that is simply stored in an array.  Not a complex "preference system."


I thought it was made clear, but it was not. I am trying to use the preference/attribute system to trigger tasks. So basically it is an event system in some way is it not? Hmmmm?
No, you have not been clear.  As Nick points out you haven't said what you were trying to do and it makes it appear you are changing the requirements of your question.  A "preference/attribute system" makes very little since on a microcontroller, so everyone here is struggling to understand what you are trying to accomplish.

Creating "events" to respond to "senor values" can easily (and most commonly) be done with if-statements or switch-cases.


AND BY THE WAY. Everyone has been telling me about the constraints to this, memory, yes I understand all of it, but I do not want to store them over a long period of time. So please get you replies on the topic and try to help me out.
What is "long period of time"?  You keep using abstracts and not giving actual information.  You aren't programming a PC.  You claim to understand this, but I don't think you actually do.

It sounds like you are trying to store sensor values and act on them.  You are significantly overcomplicating the situation with your high-level "preferences" system.
3312  Community / Bar Sport / Re: There's something funny going on with Google on: March 30, 2012, 10:42:41 pm
The thing that troubles me about this is that, even if Google are planning to "do no evil" (and making a lot of money isn't necessarily totally consistent with that), once the data is collected (who is searching for what, and how often, and what links they ultimately follow), who can say for sure that one day this won't happen:

  • Google are served with a Court order to hand over all their records (eg. "to catch terrorists")
  • The files are just leaked - remember WikiLeaks? Any security system will eventually be broken.

Since when is responding to a court order or being robbed considered evil acts?
3313  Using Arduino / LEDs and Multiplexing / Re: Glitching TLC5940 on: March 30, 2012, 10:36:39 pm
Did you give each TLC5940 it's own decoupling capacitor?
3314  Using Arduino / Programming Questions / Re: Linking to C++ includes, or having a Dictionary or List template? on: March 30, 2012, 10:32:36 pm
Is there any other way to do this.As I really need a system like this.

Why?
3315  Using Arduino / Installation & Troubleshooting / Re: arduino uno hangs host computer at startup on: March 30, 2012, 10:29:36 pm
this seems to be a very fundamental problem, but i can't find anything in the forums about it.

I don't have an R3, but my Uno doesn't give my Mac any startup issues.
Pages: 1 ... 219 220 [221] 222 223 ... 405