Show Posts
Pages: 1 ... 330 331 [332] 333 334 ... 379
4966  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Assembly or GCC? on: April 13, 2010, 09:19:52 pm
gcc is a compiler, not a language; avr-gcc is (IIRC) the compiler instance of gcc that is called by the Arduino IDE to compile the code (AVR C) into the binary that is uploaded to the Arduino board (via avrdude).

So, in effect, you already know the programming language, which is AVR C.

If you want a challenge, though, I would expect AVR assembler to be  one (from my experience with 80x86 assembler - though that has its own quirks, especially with memory handling in 16 bit mode). But if you are just wanting to get something done and not learn an entirely new language, stick with what you know (AVR C).

4967  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Can i connect two 16x4 lcd displays to arduino meg on: February 26, 2010, 05:11:01 pm
Awesome pic on that quad display, floresta - I love it!

 ;D ;D ;D
4968  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: salvaging a cd drive - what can i expect? on: April 26, 2010, 12:44:49 am
You'll typically find some gears and such (mainly for the cd tray opener), maybe a micro-switch or an optical interruptor (to tell when the tray is open/closed). There will be some form of short linear slide mechanisms (for the laser to ride on); the laser itself (provided you can figure out how to power it); the focus mechanism for the laser (generally a part of the whole laser system - it may be almost impossible to separate the two without damaging one or both). Depending on the drive and your need, the flat sheet metal that forms the outer case of the drive could be handy for things like custom brackets and such (if you have some common hand tools like nibblers, sheet metal snips, etc).
4969  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Chaining modules on: April 25, 2010, 04:08:18 pm
Let's think of a R/C vehicle: one arduino would be the brain, one for "the legs", one for the sensors? They could communicate via their I/O?

It really depends on what you are controlling and how fast (or how "realtime") you need to control it; for a simple wheeled R/C vehicle converted to a robot platform, your idea would probably be overkill - unless some of your sensors were a GPS module, and you needed to do real-time path planning/mapping coupled to IR/ultrasonic distance sensors, all while the vehicle was running around 60 mph...

Alternatively, you might have something like a 6-legged walker, and you need to do all of the above, but each leg also needs a bit of "smarts" on its own (for path planning, IK, etc) - then maybe a processor per leg would be needed, even though things might not be moving as quickly (and if they are - even more so!).

Generally, the best way to approach things is to first determine your goals, research what is needed to reach those goals, then size the system accordingly; in a system I am (slowly) building, I am only using an Arduino for basic control of motors, with servos being handled by Pololu MSSC; but on the backend I have a full PC with a fair amount of RAM and hard drive space for a future vision/LIDAR system (something which the Arduino couldn't do, at least not to the level I think will be needed).

For most systems, though, the simpler you make it, the better...

4970  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Arduino Hardware Choices - Help Needed on: April 23, 2010, 04:16:10 pm
You might be able to get all of this done with the Duemilanove; in fact, I would start with it, and the rest of the components, mainly because most people use it over the Mega, there is a ton of code out there already (and a lot of people have done GPS interfaces; plenty of threads on these forums), and it is geared toward the newbie.

There is also another reason to try this, and that would be to, in the "final product", incorporate the LilyPad 328 into the design - you would have to figure out what to do with the GPS module and LCD, but in theory you could make a "stack" with the LilyPad 328, GPS, LCD, and your buttons, and put it inside a slick round case, and end up with something real similar to that puck (especially if you can find a small LCD; maybe a Nokia cellphone serial GLCD could work?).

But first, prototype it out with the Duemilanove, then move it to the LilyPad once you are comfortable that everything is working; pick your other components (GPS and LCD, mainly) to fit in the footprint of the LilyPad. Sparkfun has plenty of options, there; if I was doing this I would go for these parts:

Arduino Duemilanove:


FTDI breakout for LilyPad:

GPS Module:

MicroSD breakout:


Plus your sundry buttons and such.

When you get to the LilyPad final, you will also want these, likely:

LilyPad LiPower Board:

LiPoly Battery:

Plus whatever case you want to put it in...

The only part that you may want to put more research into would probably be the GPS unit; I picked one of the small ones (I think it is smaller than the LilyPad) - but I don't know the particular merits/downsides to each GPS module; it may or may not be best for your application.

Hope this helps in some manner...


[edit]Another note: Some of these parts are 3.3V, some are 5V; you may need level shifters and such to get things working - which could make the "compact" bit more difficult; I am not sure how you could get around this (without having to create your own custom PCB layout)...[/edit]
4971  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Circuit on: April 27, 2010, 01:05:42 pm
So, for example, you might want the light to come on for only an hour after dark. That would be quite a lot to add using non-programmable electronics.

Because using a 555 timer is hard...?

I understand what you are saying, gbulmer, and I also realize that in many cases using a microcontroller over discreet components can have certain advantages. But there are possible disadvantages as well, and all of this should be weighed by the designer.

I have a feeling we are "raising the next generation" of electronics engineers to do everything using a microcontroller, with all the benefits and pitfalls that entails. The greatest benefits are the reprogramability and lower parts count for certain designs (not all designs). The downsides are putting trust into the designer of the CPU (and code) to not have made any mistakes that could cause a dangerous situation to occur (hmm - wide open throttles, for instance?).

Its understanding and knowing when to use what that is important (indeed, also understanding when to use electronics at all could be a component of this); without having a base of understanding of discreet electronics, you don't have the capability to make these decisions as well as you might.

Most of this certainly doesn't apply to this project, but what about the next?

Will we see more instances in the future of devices failing (possibly in catastrophic fashion) because of greater usage of embedded processors and code in situations where discreet electronics would have been a better or more reliable solution...? I realize that embedded systems have been around for a long while, and I certainly don't want them to go away - but one shouldn't have to use an entire CPU to blink an LED, outside of learning digital I/O and control (even a 555 timer is overkill for that application!).

4972  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Circuit on: April 26, 2010, 04:14:46 pm
IMHO, if you are not an EE, then I think it will be harder without a small microcontroller than with.

Or you could go here:

And use that information to do some lookup on his "Engineer's Mini-Notebooks", buy copies of all of them (they should be required reading for Arduino newbies), and find the circuit in there to do what you want with a minimum of headache.

4973  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Do you think my project is possible on: April 26, 2010, 11:08:35 am
When you say "60", the metronome will output 60 beats(in sound)

You do realize that the HM2007, when used in speaker-independent mode, has a vocabulary of only 10 words, right?

So - you wouldn't be able to say "60" (unless that is a common BPM?), but you could say "six-zero" (and anyone else could, as well).

The only problem here is that while you could get it to be speaker-independent for 10 words (numbers 0-9), you wouldn't have any "mark" or "command" words to tell it to "go" (you would probably have to use a timeout or something; but then again, you wouldn't have any way to tell it to "start", either).

The 40 word vocabulary of the HM2007 is only available for speaker-dependent use; if only one person -ever- will use this, and you don't mind re-training the metronome between users (or each user would have their own), then the system could potentially be more versatile, at the expense of needing to be trained before usage.

Maybe you should go for a hybrid approach; use those 10 speaker independent words for commands: "set beat", "play beat", etc - then have it listen for clapping for the beat via a separate system (which would be similar to a door knock detector) activated by the command spoken.

4974  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Connect to network via USB?? on: April 26, 2010, 12:47:11 am
Using a web server like apache on the pc would be one way.

Actually, the best way would be to set up a SLIP connection on the PC talking to the serial port the Arduino is on:

Fortunately, there's a library:

4975  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Analog Input on: April 25, 2010, 05:00:16 pm
Back when I went to HTI here in Phoenix, one of our projects was to create a photo-transistor array (8x8) that could be read by an Amiga 500 via its parallel port (we had to code up in C a program to read the data from the port); from what I (barely) remember, the way it was driven was via a circuit similar to what is seen implemented to drive an 8x8 LED matrix...

4976  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: ROV DC motors need some help on: April 23, 2010, 02:10:32 pm
[edit]I'm just trying the bootstrap the experiments here - the precision engineering comes later[/edit]

I suppose, but I can imagine the follow up question of "I can get it to turn both ways now, but I can't shut it off" - it would be easier to head that question off first.

I guess the initial "u" is silent, like the "c" in "rap music"

I know I have posted about this before; ROVs are underwater remote operated vehicle, UAVs and Unmanned Aerial Vehicles, and UGVs are Unmanned Ground Vehicles. This is just the way things are; do a search for "ROV", you'll find submarine vehicles galore (plus a few water surface craft; maybe these will be call UFVs or UBVs in the future?).

4977  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: ROV DC motors need some help on: April 23, 2010, 11:17:26 am
Groove, Zoomcat; based on your words/drawings - while those ideas will allow direction control of a motor (and in Zoomcat's case, limit switches to shut it off) - neither of these will work for the OP's application.

What's being built is an ROV (underwater remote operated vehicle), the up/down (and left/right) motors need a way to be turned off (and while Zoomcat's limit switches could work in a steering control or similar, they aren't much use for a prop thruster).

What is needed (if using relays) is an h-bridge constructed from 2 SPDT relays (each with their own transistor control), one for each motor. Alternatively (and better from an amperage point of view) would be to use 4 SPST relays, one for each leg of the h-bridge; and 4 transistors (and diodes, and everything else) - plus you would need to be careful not to set the wrong relays creating a direct-short...

Really, it would be better to (and cheaper), depending on the current requirements of the motors, of course - to buy some IC-based motor drivers (L298, etc) instead; depending on the source, it would only cost a few dollars per motor, whereas the relay method could cost much more than that.

Of course, if the current requirements are high, then using relays may be the cheapest method per motor; high-amperage pre-built motor drivers (greater than 5 to 10 amps) get expensive quickly, whereas relays are cheap.

The big disadvantage, though, of relay h-bridges (unless you have a beefy mosfet controlling the motor power input), is the inability of them to PWM speed control the motors - this applies whether the h-bridge is driving a low current or high current motor (though it can be done with a low current motor if a suitable transistor or mosfet of the proper size is used to control the motor power input, as mentioned; a large NPN or N-channel mosfet on the low side of the h-bridge and ground could work).

The OP's gonna need a bigger allowance to complete this project if he wants to use the Arduino in it!

4978  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Is this a good deal? on: April 19, 2010, 06:49:13 pm
i believe the low deck is called a breadboard.

I take it the "400" term means 400 tie-points...?

and yes, it's in US dollars.

If you were here in the US, then that wouldn't be so great a buy; does the $66.00 US include the shipping cost?

the thing is that they have to be able to ship to sweden.

Normally I would suggest buy the Arduino, then spend the rest of the money on some "grab bag" part kits from a surplus dealer, and pick up a cheap breadboard and wires off of Ebay.

Since you are in Sweden, though, where surplus is apparently outlawed, and there are shipping restrictions (for what reason?) - if that $66.00 is all-inclusive (parts and shipping), then it is probably your best deal - for your geographical area.

Elsewhere, maybe not so much.

That must be the tradeoff for universal health care and babes...


Hopefully I'll be old and senile (then again, I am already half way there - you decide which half!) before that happens here in the States; I don't think I could live if I didn't have electronic junk to scrounge up and play with...

4979  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Is this a good deal? on: April 19, 2010, 02:38:32 pm
What exactly is the second item?

Is $66 "US dollars" or some other currency?

I concur with Paul that if that is US dollars, that's a little high (depending on shipping).
4980  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: problem in sending values serailly on: April 20, 2010, 12:11:11 pm
Why not just send the ASCII byte - 0x00, 0x01, 0x02...0x0A, 0x0B, 0x0C...0xFD, 0xFE, 0xFF?

Those values (in hex) correspond to the values 0, 1, 2...10, 11, 12...253, 254, 255. Just output those characters to the port, and read in the values on the Arduino.

For example, say you wanted the number "65" for the Arduino; ASCII value 65 equals "A" - so send an "A" (66=B, and so on).

For the lower values, you may need to get tricky, depending on the value. For example, "0" is the null character, so in C you would send "\0" (IIRC). For "10", which is the linefeed character, hex 0x0A - you would send "\r". Depending on how you wrote your serial output interface on the PC side, you may be able to get away with sending the hex values directly.

As others have noted, there are plenty of examples on this, and there are plenty of libraries that deal with this issue if that works better for you and you have the leftover memory to include one. You already know you are getting ASCII values for characters you send; just expand on this knowledge (note - it is a good idea in your loop to look for start and end characters that signify the beginning and end of the transmission; that way, spurious characters won't likely cause an unwanted action to occur).

Good luck.

Pages: 1 ... 330 331 [332] 333 334 ... 379