Loading...
  Show Posts
Pages: 1 2 3 [4] 5 6 ... 57
46  Using Arduino / Sensors / Re: RS232 on: August 21, 2012, 09:40:39 pm
Quote
I'll do the search for you. https://www.sparkfun.com/products/449

Oh wow, sparkfun is getting pricey.  http://www.ebay.com/itm/MAX232-RS232-To-TTL-Converter-Adapter-Module-Board-/330779226662?pt=LH_DefaultDomain_0&hash=item4d03fa7226

Obviously I can't vouch for the seller, but there's a ton of options on there.
47  Using Arduino / Programming Questions / Re: Sketch works with one button but not 2 on: August 21, 2012, 09:30:09 pm


Your code is atrocious to try and read.  Even stuff like your if statements, why the explicit "== HIGH" on only one branch?

I'm pretty sure your problem is that you're setting your state variable wrong.  I don't think

state = 1 - state;
state = 2 - state;

is doing what you think it is.  But because of how poorly written your code is, it's hard to say.

Your if's and else's make no sense.  If state = 1, doesn't that guarantee the last thing you do is execute the else for state = 2 so you'll never even see the result of your state = 1 portion?

48  Using Arduino / LEDs and Multiplexing / Re: Problem with led matrix array on: August 21, 2012, 09:14:51 pm
The schematic of the Matrix is really simple. There are 5 rows with 7 led each. The rows have a common gnd ant the columns have a common anode.
I use 330R resistors. Everything is connectet to the digital pins of my Arduino UNO.

If you can't tell us what you're doing, nobody can help you and this thread is an exercise in frustration.  How is the matrix connected to the Arduino?

Everything is connected to the digital pins?  Directly? so rows and columns?  The Arduino outputs can only sink or source 40mA, which is not enough to drive a full row (or column) as you can.

If you have resistors on the rows and columns, you are splitting your current among whatever LEDs are on on that row (or column) so the brightness of each row (or column) will depend on how many LEDs are on and will not be consistant across the matrix.
49  Using Arduino / Programming Questions / Re: Don't know why this isn't working (DeBounceing) on: August 07, 2012, 12:23:37 am
Did you mean to use i for your iteration variable and buttonPin as your paramenter to digitalRead?

Code:
for (int i=0; i <= 9; i++){
// read the state of the switch into a local variable:
int reading = digitalRead(buttonPin);
50  Using Arduino / Programming Questions / Re: minimum delay on: August 02, 2012, 09:46:06 pm
I think what Wizened was saying is it is simply impossible for any device to raise a voltage level in 0 time.  In any square wave, the signal takes some time to go from 0 to x.  The sides of the square wave are never truly vertical.  It has nothing to do with Arduino, it's a physical reality.

Why don't you tell us what you're trying to do and we can help you out more?
51  Using Arduino / Audio / Re: Compare two analog input signals on: August 02, 2012, 09:19:34 pm
Please don't cross-post.
52  Using Arduino / LEDs and Multiplexing / Re: Comparing two analog input signals and outputting a digital signal on: August 02, 2012, 09:14:55 pm
I'm not sure what's confusing you.  Wouldn't it basically be:

Code:
var1 = analogRead(0);
var2 = analogRead(1);
if (var1 > var2)
 digitalWrite(pinOut, HIGH);
else
 digitalWrite(pinOut, LOW);

As long as you're using a 5V arduino your 0-5v will be scaled from 0-1023.
53  Community / Bar Sport / Re: Ardunio C++ SUCKS!!!! on: August 02, 2012, 08:31:24 pm
I can't help feeling like I'm feeding a troll here, but if you really don't like C++, I suggest you look into JAL for the PIC microcontollers.   It's a pascal-like language but simplified for easy programming.  The developer has also created a bootloader, target boards and a set of modules he calls dwarf boards to add hardware, much like shields.  There are also picaxe devices you can look into which are pic microcontrollers with a BASIC intepreter/bootloader preinstalled.  That might be more your speed.

I actually came from JAL to Arduino about 6 years ago, specifically because I preferred the extra power and functionality C++ provided.  Things that were quite difficult in JAL such has dealing with timer interrupts and using the CCP module are trivial with Arduino.  Over the past 6 years I've been amaze at the quality and volume of libraries that have been donated to the Arduino project, but if you see the libraries as a hindrance you might be a lot happier in JAL.

If I have any complaint about Arduino it's that it's made everything so easy that even when I know a small program on a pic10F is the better way, I still go for the arduino out of laziness.

I do come from a computer science background so when you talk about the limitations of C++ you really do sound ignorant, I strongly suggest you read up on structured programming and why it's a good thing.  C++ also does allow you to use gotos, and I won't even say you shouldn't, but you better understand why most people say you shouldn't before you do.  C++, while being structured also does give you far more control over the flow of your program than most languages, it is extremely powerful, but with that power, it's also very easy to shoot yourself in the foot.
54  Using Arduino / LEDs and Multiplexing / Re: Driving 14 or 16 segment LEDs on: August 02, 2012, 08:53:43 am
Thanks for your reply.  I did look at the data sheets for the MAX6654/6655 type chips, they seem quite a bit more complicated to use than the 7219 because they try to be so much more versatile; more LED arrangements, a built in port extender, etc.  I also don't think I can get them in through-hole which might be a problem for me.

Those chips also support 128 LED segments which is one reason for the complexity.  From your post, can you point me at any drivers that do 1 or 2 digits?  I only need 4 digits so that won't be so bad for me.

Using 2 shift registers, a transistor array, and resistors will up my component count a lot.  Programatically, I'd use a timer interrupt handler to do the multiplexing so I could have a set-and-forget interface which I find a lot cleaner than blink-without-delay, but that whole scheme seems so inelegant.  I'm just surprised it's such an easy thing to do with 7 segments but so hard with 14.

I thought the 14-segment display would be a pretty solution, but it's at the point where I'll probably just go with a character LCD.
55  Using Arduino / LEDs and Multiplexing / Driving 14 or 16 segment LEDs on: August 01, 2012, 01:01:53 pm
Is there a good way to drive 4 14-segment LED's?  I'm looking for something comparable to a MAX7219.  I'm aware of the option of using a couple of shift registers and a transistor for each digit, but would prefer a driver that takes care of all the multiplexing and current drive for me.  I've seen SMD chips that will handle 8-digits but I need through hole parts. 

Thanks
56  Using Arduino / Programming Questions / Re: Migrating Mac to PC Arduino Library on: April 18, 2012, 12:03:57 pm
I've been using a mac to do Arduino program for a while.  I have to agree with the OP that it sounds more like an upgrade.  It seems like lately everything is harder to do on the Mac, for example, where are the built-in libraries hidden on the mac if I need to adjust pins?
57  Community / Exhibition / Gallery / Re: Simple prime number printer on: August 14, 2011, 10:53:20 am
Cute little project.  Primes are a lot of fun to play with.

When you count through your for loop, you don't need to compare any even numbers (after 2), so you can increment by 2 which should double your program's speed.

If a number is not prime, it will have factors that are prime, so if you want to get a lot more advanced and a lot faster, you can keep a table of all the primes you've already computed and iterate through those instead of testing every odd number every time.  That gets into a programming technique called "dynamic programming".
58  Using Arduino / General Electronics / Re: Mobile news broadcasts on: August 09, 2011, 08:16:28 pm
Thanks for your reply.  So if they're 5-10 miles from the CN Tower but surrounded by tall towers in every direction so there is no line of sight, they will use a shorter range wireless transmitter?  Would it be omnidirectional then?  If the area is surrounded by things like streetcar power lines (with nice big sparks), glass, steel, and concrete towers and other sources of interference, can they still get a high quality signal over that distance with a short range transmitter?

Since you mention Helical antennas, I think they also have that.  It looks like the same sort of telescoping tower with a spiral up the outside of the central pillar.
59  Using Arduino / General Electronics / Mobile news broadcasts on: August 08, 2011, 09:29:27 pm
I hope this isn't too far off topic, but I was wondering if someone could take a few minutes to help me understand something.

There's mobile news vans around the city that have tall extending antenna towers to transmit their feeds back to the station.  I'm in Toronto where the receiving antenna is the CN Tower, so usually there's a little dish pointed right at the tower.   My question is in areas where there's lots of tall buildings so there's no line of site and areas where RF reception is horrible, what does the van broadcast to.

I was with someone who tried to tell me they bounce the signal from building to building until it gets to the CN Tower, but that sounds like bull to me.  The only other things I could think of though are bouncing off a satellite or the ionosphere, neither of which sound much better.

Thank you if anyone knows the answer.
60  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: LiquidCrystal and HD44780 on: April 11, 2009, 10:46:20 pm
I've been having the same problem with my LCD but I was waiting until I had my project a lot more developed before dealing with it.   I made the changes to the library mem suggested and it now works perfectly.

I found this thread by searching, and I would second diego's request to have the change made to the original library.  If I wasn't lucky enough to find the thread, I could have been struggling for a long time.  My project is very harsh on the power supply, and I would have been adding decoupling caps all over the place figuring it was a brownout problem, especially since it was intermittent.

I'm using the seeedstudio 2x8 blue LCD.
Pages: 1 2 3 [4] 5 6 ... 57