• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

A Day in Code - Arduino

 
Marshal
Posts: 3457
493
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just went to your Kickstarter page and I really liked to see that you have gone beyond the keyboard and screen and are incorporating Arduino in the lessons.  The example on the page was switch/LED project.  What other Arduino applications are you thinking of including in the book?
 
Author
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The book actually doesn't include Arduino-specific code or lessons. I wrote on the campaign page that the programming concepts and C syntax can be applied to programming the Arduino (such as for loops, while loops, if/else, functions, etc.).  Each code example in the book uses the C standard library stdio.h, and prints the output to the screen using the printf() function.  I chose to design the book this way so that the book and a free C compiler is all the reader needs to test out the code and play around with it to understand how the logic works.  The purpose of the book is to gain a good understanding of fundamental programming concepts and C syntax. I'm planning to have a resources page at the end of the book that  describes how C programming is used in embedded systems and mentions the Arduino as a resource.
 
Saloon Keeper
Posts: 23409
159
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One thing about the Arduino that makes it difficult is that I've never actually seen it officially said that the common Arduino programming language is in fact C++. Although years of cautiously exploring the boundaries have convinced me that most, if not all of the language features work on that platform.

What's definitely different is the runtime library environment. When compiling ".ino" files, the #include for "arduino.h" is implicit, and doesn't need to be explicitly stated in the sketch. And the standard C/C++ libraries may only be available as stripped-down versions, or missing.
 
Shari Eskenas
Author
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is in the Arduino FAQ:

"Can I program the Arduino board in C?"

"In fact, you already are; the Arduino language is merely a set of C/C++ functions that can be called from your code. Your sketch undergoes minor changes (e.g. automatic generation of function prototypes) and then is passed directly to a C/C++ compiler (avr-g++). All standard C and C++ constructs supported by avr-g++ should work in Arduino."
 
brevity is the soul of wit - shakepeare. Tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic