[nmglug] Beginning C Programming and AVR microcontrollers

J. Marsden DeLapp jmdelapp at delapp.com
Thu Jun 12 11:21:39 PDT 2014


On Wed, 11 Jun 2014 21:45:15 -0600
Akkana Peck <akkana at shallowsky.com> wrote:

> J. Marsden DeLapp writes:
> > Who would have thought that learning C programming would be so
> > controversial?
> > 
> > The project is to build a PV solar system monitoring and control
> > system. The system will consist of Arduino(s) to interface with the
> > solar system(s). [ ... ]
> > Arduinos require C programming. 
> 
> Sounds like a fun project!
> 
> Arduinos are a weird case because it's not really C, it's C++, but
> it's not normal C++ either.  They won't be able to use the exercises
> from a standard beginning C book: they'll bog down at the very first
> hello world example, because there's no printf.  They won't even need
> for or while loops for quite a while, since most of their looping will
> be done in loop().  And they won't be using cc either, or worrying
> about pointers.  But they will need to know about special library
> calls like digitalWrite() and analogRead(), and classes like Serial
> so they can do Serial.println.
> 
> For an Arduino project, it's much better to use an Arduino-oriented
> programming introduction, unless you're planning to teach them C
> first and then introduce the Arduino later.

We will do both. We will be using the Arduino Integrated Development
Environment (IDE) which hides a lot of what is happening. And we will
do a few exercises in C on a laptop to learn a bit about C programming
in general. 

If you peak under the hood of the Arduino IDE you can find that the IDE
uses the GNU tool chain. It uses gcc-avr compiler, avr-libc C library,
and avrdude to upload the compiled software to the microcontroller.


Mars

-- 
=============================================================
J. Marsden DeLapp, PE
President
DeLapp & Associates, Inc. dba DeLapp Engineering.
Providing lighting and power planning, design and analysis services
for commercial, industrial and large residential facilities.
1190 Harrison Road Ste 3a
Santa Fe NM 87507
(505) 983-5557
http://DeLapp.com
=============================================================


More information about the nmglug mailing list