0

I'd like catch up the Arduino concepts (programming & IDE). There are excellent online tutorials available for Arduino but all of them which I saw are made for those who didn't have embedded/electronics background. Going through them is heavily time consuming as I'm already familiar with the embedded programming other than Arduino or Raspberry Pi.

Does any one know any quick reference materials for Arduino which excludes electronic/embedded basics which is meant for experienced embedded programmer? That could be a big time saver for me.

Thanks in advance!

migrated from electronics.stackexchange.com Feb 6 '16 at 23:18

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

  • What exactly do you want to know about the Arduino, that you cant find in the tutorials? Given your supposed experience, you should be able to begin using the Arduino for projects and such; its a dev-board that can be programmed in C/C++, with libraries all over GitHub, thats about all you need to know. The indepth details about its workings can be found at the arduino.cc site. – TisteAndii Feb 6 '16 at 13:17
  • Arduino development framework for embedded C programmers ( something like 'C++ for C programmers') – user3214692 Feb 6 '16 at 13:44
  • Hook up an Arduino to pc and start playing with it. IDE has examples. – user1561461 Feb 6 '16 at 14:28
  • That's should be fine for 'Hello world' or 'Blink LED'. I'd like get the feeling how powerful/useful it's in multi-tasking, real time response, pros & cons compared with legacy development tools, etc. Off-course I can get all these info by googling one by one. But I was curies to know if any comprehensive reading materials available which is shows Arduino in different angle for the audience like me. – user3214692 Feb 6 '16 at 14:45
  • 2
    If you are experienced with embedded programming, forget about the IDE and the Arduino specific libraries, they tie down an experienced user. Grab the AVR's datasheet and just use Arduino board as just another dev board, you can program it using avrdude and there is a good gcc based toolchain. Use C or C++ whatever you are used to. – jippie Feb 6 '16 at 14:56
4

As far as I know, there is no tutorials about using Arduino's for, e.g. "multi-tasking, real time response". That is not the focus of the Arduino community.

The Arduino UNO development board is built around Atmel's ATmega328. The Summary datasheet gives an overview of its hardware capabilities on the first page. If you are familiar with MCU development, that should give you a feel for its hardware capabilities. The complete ATmega8/168/328 datasheet is over 600 pages, and describes every feature, with all registers in detail.

The Arduino IDE uses gcc under the covers. So you likely already know how to use that. When you download and install the Arduino IDE, gcc and gnu binutils for AVR will be installed too.

The Arduino IDE has all of the Atmel header files, so much of the code in the datasheet should compile, link and upload.

The IDE is really designed for beginners. It is to easy to use, but has very few features beyond basic editing, compiling and loading. It does support a serial-monitor to see text printed by the uploaded application, but it doesn't support a debugger like GDB out-of-the-packet.

However, it doesn't prevent you writing C++ code and header files, and it will build the whole collection of files.

Because the IDE lets you create and edit C++ directly, you can install the IDE on any of the three main platforms, and get started very quickly.

You will probably want to visit AVRFreaks who tend to focus at a lower level than Arduino.

There is also AVR LibC library which points you at the documentation for the AVR upload tool, avrdude, and debugger.

Summary: Install Arduino IDE, do a couple of quick projects to get a feel for the system. Then start writing C++ as normal. Install AVR LibC library for a more traditional library, and visit AVRFreaks forums for more technical help and information.

  • No need to install avr-libc, as it is already there: the Arduino core is built on top of it. – Edgar Bonet Feb 7 '16 at 12:48
1

But I suppose to debug an existing Arduino project (which my friend gave to me because the developer left from his small electronic company) developed for GSM based remote motor control product. They haven't used Arduino board but used Arduino IDE/library for coding. Flashed the hex output from Arduino on their custom board with Atmel processor. So I need to go through the existing Arduino code and help them to solve the issue that they are facing.

This is maybe one of the worst type of projects to get involved in. Code that needs debugging on a platform that you have not used before. Code that you might not know the status of and where the requirements are loose.

I would recommend starting by getting all the details on the table. Understand the intended software architecture, estimate memory foot-print, and processing, etc - if the product is feasible. There might be a reason for the developer ditching this project?

AVR is small scale embedded and that implies a very different implementation strategy. There is no operating system and much of the code is bare metal.

The Arduino core is a platform (library) that abstracts a small set of basic hardware functions. It was originally intended for Media/Design Students. To help reduce the threshold when getting started the IDE has build support, i.e. pre-processing, such as an implicit add of the Arduino header file (Arduino.h) and generation of forward declarations for functions in a sketch. The IDE does not use make/makefiles. Source code is C/C++ (AVR GCC) and if necessary AVR assembly.

The quick reference for the Arduino core function can be found here. There is also a list of libraries. Some are packaged with the Arduino IDE/core while others need to be installed. There is a library manager in the IDE to download and install some of the libraries. New libraries are added more or less daily right now.

Depending on the code you will have to read more about the libraries used and/or internal AVR hardware (registers, functions, etc).

Cheers!

  • There are a couple of generic Arduino Makefiles floating around the Web. These let you work on Arduino projects without the IDE. The one I use tells gcc to -include Arduino.h, but it does not do forward declarations for you. – Edgar Bonet Feb 7 '16 at 12:51
  • In Cosa I have adapted Arduino-Makefile to allow make based build without makefiles. Make allows parallel build using all processor cores (on the host) and advanced library caching. Bottom-line: ultra fast build. Ref. github.com/mikaelpatel/Cosa/tree/master/build – Mikael Patel Feb 7 '16 at 13:02
  • Hi Mikael, The links you have pointed are a really a quick reference for me. Many things I came to know about AVR /Ardunio after I post my question here. As you said, it's different than any other controllers/IDE that I worked for like NEC, ST, etc. May be targeted for different applications. Thanks to every one! – user3214692 Feb 8 '16 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.