Advantage of Arduino

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

The advantages, in my opinion is that Arduino is easier to understand, and it is quicker for writing working code. Then, you also have the advantages of examples, and shared knowledge.

Dear cyclegadget
Thank you very much for reply

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

In Assembly using PIC

loop
bsf portb,1
call delay
bcf portb,1
call delay
goto loop

delay is a built in function on PIC, is it?
Pin modes?
Is this a troll?

I hope he is not fishing...

It is quicker for me because, I am not sharp at port control and I have not memorized registers or things like that. I am a Novice but, I do alright using Arduino. To do what you did, I would have to look up things and that is where my time would be.

Copy and paste took 30 seconds more or less.

/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
 
  This example code is in the public domain.
 */

void setup() {                
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(13, OUTPUT);     
}

void loop() {
  digitalWrite(13, HIGH);   // set the LED on
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // set the LED off
  delay(1000);              // wait for a second
}

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

Advantage include:

  1. Easy to use and free IDE, available in all popular PC operating systems.
  2. Access to many arduino supplied C/C++ libraries and functions as well as a world of 3rd party contributed C/C++ libraries and functions.
  3. Help is always available from this very friendly forum.

What more could a newcomer ask for?

Lefty

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: