Advantage of Arduino

If you're into assembly, and you're OK with using binary logical operations to toggle ports, you may feel like the Arduino is more of a toy. The IDE is meant so you can write code, click a button, have a working project. It's honest-to-gosh C/C++, but there are many tricks that go on behind your back so you don't have to mess with the gory details. If you like gory details, and you feel more comfortable knowing how something happens, rather than just accepting that it does, you'll get frustrated with the Arduino IDE.

The AVR (non-Arduino) is more like PIC. If that's what you're comfortable with, the only advantage to the Arduino is the collection of excellent drop-in code libraries and examples.

duinopad:
What is the advantage Arduino than AVR.if both use same chips

Arduino uses an AVR chip. AVR is another name for ATmel microprocessors, so your question doesn't make any sense.

duinopad:
Dear All
I am new for arduino
I would like to know, What is the advantage Arduino than AVR.if both use same chips
Thanks in advance

A lot of people use Arduino, they are kind to share and help, that is the 1st!
Connection is simple, only use a USB type B cable compare with AVR Butterfly
A lot of example application in the web
The code is much easier yah to be understood
I love the color, the name, the nation (Italy),I love pizza
Everyday, the user increases, it motivate me to improve and improve
I love open source!

It's very welcome to answer you :smiley:

if you can prove that quicker writhing code

What sort of prof do you want with code so ridiculously simplistic as that!

It is like asking for the simplest "hello world" example to compare languages, it tells you nothing useful.

It is like asking for the simplest "hello world" example to compare languages, it tells you nothing useful.

not agree ]:slight_smile:
It can tell you something about how stdio is implemented, what a minimal program looks like, if strings are native supported, maybe if compiled what the minimal exe size is,
but yes, it is only a drop in the ocean of things to know about a language :slight_smile:

see - http://c2.com/cgi/wiki?HelloWorldInManyProgrammingLanguages -

In Assembly using PIC

But you didn't include the code for delay ! And it won't work because you haven't set TRISB so that the pin is an output, and you haven't properly handed selecting the correct bank for portb (may not be necessary on some PICs.)

Please rewrite your example such that it will blink any digital output pin on the chip (any port, any bit) with a variable delay specified in milliseconds (accurate to +/- 1ms), and THEN compare to the Arduino Blink example...

robtillaart:

It is like asking for the simplest "hello world" example to compare languages, it tells you nothing useful.

not agree ]:slight_smile:
It can tell you something about how stdio is implemented, what a minimal program looks like, if strings are native supported, maybe if compiled what the minimal exe size is,
but yes, it is only a drop in the ocean of things to know about a language :slight_smile:

HelloWorld makes for some interesting ad hoc comparisons, but it really doesn't say much beyond that. Simple terminal I/O and the notion of "strings" are not nearly universal enough for all the different computing environments a language can be designed for. Even common OO languages implement a String in vastly different ways that is not apparent at all when you look at the syntax and grammar.

It would be much appreciated, if you can prove that quicker writhing code using example like LED blinking
Thanks in advance

  1. You can not write code quicker with Arduino.
  2. Arduino is simpler because of the IDE that works out of the box most of the time. Thus the entry barrier is lower for beginners.

If you are an expert you may still use an Arduino because of the shields or just because you have one lying around. But if it is simpler or not for your tasks is your decision.

Any questions like is A better than B without defining what exactly the meaning of "better" is are basically pointless. Especially in cases where A is a part of B.

The other thing is...
I give you three "virgin" computers; one with MacOSX, one with Linux, and one with windows.
Get a "blink" example written, compiled, and loaded onto a microcontroller, using each one.
This is actually not as bad as it used to be for PIC, since MPLAB-X now runs on MacOSX and Linux, but I'd still bet it would go faster using Arduino.

Please rewrite your example such that it will blink any digital output pin on the chip (any port, any bit) with a variable delay specified in milliseconds (accurate to +/- 1ms), and THEN compare to the Arduino Blink example...

...preferably setting the delay using a connected potentiometer, and reporting the delay time in decimal to the serial port.

westfw:
The other thing is...
I give you three "virgin" computers; one with MacOSX, one with Linux, and one with windows.
Get a "blink" example written, compiled, and loaded onto a microcontroller, using each one.
This is actually not as bad as it used to be for PIC, since MPLAB-X now runs on MacOSX and Linux, but I'd still bet it would go faster using Arduino.

This is actually one of the main strengths of the Arduino hardware and software platform. There is reasonable parity across a wide variety of user environments. This intersects well with the project goals:

Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.

westfw:
The other thing is...
I give you three "virgin" computers; one with MacOSX, one with Linux, and one with windows.
Get a "blink" example written, compiled, and loaded onto a microcontroller, using each one.
This is actually not as bad as it used to be for PIC, since MPLAB-X now runs on MacOSX and Linux, but I'd still bet it would go faster using Arduino.

Actually, I'd extend this further. I'll give these three virgin computers to someone who has never written a line of code in his/her life. Then we know for SURE that it'll happen weeks, if not months, faster with Arduino.

Give it to someone who knows C or assembly and your definition of better may shift. The IDE confuses me more than it helps, as there isn't a good reference on how things are done behind the scenes. I always wonder, "is this part of the process glue, or am I expected to handle it myself?"

This was also a challenge migrating Arduino code into a real IDE. How are the module .cpp files handled? Is it just a parser that reads any includes in the .ino file, and automatically compiles all the .cpp files in the same directory and below?

I would've loved a section of documentation like: "If you have experience with C/C++ development and toolchains, here are things you need to know." It may seem silly, but when I started, I didn't understand the tabs at all. Now I know all my code is just concatenated and compiled as one big unit. I first tried opening a .c file that included a .h file, and things broke horribly. It took some trial and error to find out the designers had made things "easier".

It is a relatively friendly environment for beginners, however.. I don't think it does anyone any favors if they intend to move up and beyond the IDE. (At least you can still use generic AVR libc from within the Arduino environment, though. That's nice.)

" The IDE confuses me more than it helps, as there isn't a good reference on how things are done behind the scenes."

I found the IDE pretty easy to use - writing code just seemed like writing fancier BASIC code to me. Once I get the ;s and { }s to line up, and had looked at lots of examples, it started going pretty smooth. Not having to deal with behind the scenes stuff until I was ready to use another uC was not a hindrance for me coming from a hardware designer background.

Of course, if one were to look at some of my initial requests for help in the old forum, a different opinion might be drawn :wink:

Arduino is a ready to use prototyping environment that has a good (large?) collection of proven libraries and a large user base operating in an open environment and obtainable at a very reasonable price. The programming IDE is readily adaptable to other devices in teh AVR family (I have added support for the ATtiny2313 and the ATMega1284P). It has a FREE set of tools that has a not-to-steep learning curve and a variety of examples to help get you up to speed. The Arduino comes in a form factor that is very easy to prototype and for which there are a variety of products available to help you to use it in ways that you decide. And most of these devices are opensourced and rather inexpensive. Other than the basic investment (I paid $30US) it has a very low cost of ownership. (unless you buy a handfull of chips, the supporting resonators/crystals, capacitors, resistors, reglators, Max232's, etc)

It is a nice, small, easy to use product that gives excellent results.

there isn't a good reference on how things are done behind the scenes.

Redirecting ?
And of course there is 'read the source'...

Im one of those noobs who never got past downloading all the software, learning how to use it, learning c and how to compile and make it with all the parts and files and finally upload to blink an led
when I saw arduino I was writing my first code for an 8x8 matrix before I even had the arduino come in the mail! Now after the fact its been much easier to delve behind the scenes and see how all it works

westfw:

there isn't a good reference on how things are done behind the scenes.

Redirecting ?

Uhm, er... uh... besides that one, of course... :sweat_smile: mmmm... humble pie....

Other than the basic investment (I paid $30US) it has a very low cost of ownership.

HA! Yep, sure it does. Just like crack. XD

(unless you buy a handfull of chips, the supporting resonators/crystals, capacitors, resistors, reglators, Max232's, etc)

There it is! Digi-key sends me Christmas cards now.

Digi-key sends me Christmas cards now

Oh, you let them off light! You should see the 3" high catalogs I get!

Dave Jones had a funny episode about that: