Class to learn programming

Hi, I have an elective to sign up for next semester and I’d like to take a class on microcontroller programming. What is the right class to take? Would I be better off taking a c++ class? What is the best way to learn this in a classroom environment? I would like to have an instructor that I can ask questions when I get stumped. Thanks

A C++ course would be useless if, for example, the microcontroller class was taught solely in assembler.

What classes are available to you?

What are you more interested in? Learning microcontrollers means learning about programming (C++) and electronics as related to the hàrdware.

Check to see if the class has labs where you can apply what you learn and have an instructor available to answer questions.

There are lots of tutorials on starting out and learning Arduino on line and this forum has some very experienced members available to answer questions 24/7.

The hardware side is simple. Programming is definitely my weakness. This forum is a great help but I want want to have someone teach me the software side all of this.

Welcome to the “Self Taught Arduino C++ Course”.
When you run into problems ask for help.

Course material.


How to use this forum:
https://forum.arduino.cc/index.php?topic=149014.0


Listing of downloadable 'Arduino PDFs' :
Either Google >>>- - - - > arduino filetype: pdf
Or
https://www.google.ca/search?q=arduino+filetype%3A+pdf&rlz=1C9BKJA_enCA739CA739&oq=arduino+filetype%3A+pdf&aqs=chrome..69i57j69i65.1385j0j7&hl=en-US&sourceid=chrome-mobile&ie=UTF-8


Listing of downloadable 'C++ PDFs' :
Either Google >>>- - - - > C++ filetype: pdf
Or
https://www.google.ca/search?q=c%2B%2B+filetype%3A+pdf&rlz=1C9BKJA_enCA739CA739&oq=c%2B%2B+filetype%3A+pdf&aqs=chrome..69i57.22790j0j7&hl=en-US&sourceid=chrome-mobile&ie=UTF-8


Arduino cheat sheet:


Watch these:
Arduino programming syntax:

Arduino arithmetic operators:

Arduino control flow:

Arduino data types:

Jeremy Blume:

Sparkfun External Interrupts

Sparkfun Timer1 Interrupts

Powering You Projects


Understanding Destructive LC Voltage Spikes:

OR

Why MOSFET gate resistors:


Some things to read

LCD information:

OR

Reading a schematic:
https://learn.sparkfun.com/tutorials/how-to-read-a-schematic

Language Reference:
https://www.arduino.cc/en/Reference/HomePage

Foundations:


How and Why to avoid delay():
http://playground.arduino.cc/Code/AvoidDelay

Demonstration code for several things at the same time.
http://forum.arduino.cc/index.php?topic=223286.0


Multitasking:
Part 1:

Part 2:

Part 3:


Neopixels, Adafruit

Fastled


Sparkfun Tutorials:
https://learn.sparkfun.com/tutorials?page=all

Micro Controllers:

Useful links:

Arduino programming traps, tips and style guide:
http://www.gammon.com.au/forum/?id=12153

Call for useful programming discussions

Arduino products:
https://www.arduino.cc/en/Main/Products

Motors/MOSFETs
http://www.gammon.com.au/motors

Switches:
http://www.gammon.com.au/forum/?id=11955

A good book you might want to get:


Share tips you have come across, 500+ posts:


Debug discussion:

Frequently Asked Questions:
https://www.arduino.cc/en/main/FAQ#toc10


Number 'type's:

  • boolean (8 bit) - simple logical true/false, Arduino does not use single bits for bool
  • byte (8 bit) - unsigned number from 0-255
  • char (8 bit) - signed number from -128 to 127. The compiler will attempt to interpret this data type as a character in some circumstances, which may yield unexpected results
  • unsigned char (8 bit) - same as 'byte'; if this is what you're after, you should use 'byte' instead, for reasons of clarity
  • word (16 bit) - unsigned number from 0-65535
  • unsigned int (16 bit)- the same as 'word'. Use 'word' instead for clarity and brevity
  • int (16 bit) - signed number from -32768 to 32767. This is most commonly what you see used for general purpose variables in Arduino example code provided with the IDE
  • unsigned long (32 bit) - unsigned number from 0-4,294,967,295. The most common usage of this is to store the result of the millis() function, which returns the number of milliseconds the current code has been running
  • long (32 bit) - signed number from -2,147,483,648 to 2,147,483,647
  • float (32 bit) - signed number from -3.4028235E38 to 3.4028235E38. Floating point on the Arduino is not native; the compiler has to jump through hoops to make it work. If you can avoid it, you should.

You should always select the 'data type' best suited for your variables.
ex:

  • your variable does not change and it defines a pin on the Arduino. const byte limitSwitchPin = 34;
  • since an analog variable can be 0 to 1023, a byte will not do, you can select 'int'. ex: int temperature;
  • if your variable needs to be within -64 to +64 a 'char' will do nicely. ex: char joystick;
  • if your variable is used for ASCII then you need type 'char', ex: char myText = {"Raspberry Pie Smells"};
  • if your variable enables some code then boolean can be used. ex: boolean enableFlag = false;
  • millis() returns the time in ms since rebooting, ex: unsigned long currentTime = millis();
    etc.

Oh, and have fun too :slight_smile: !

oh WOW!!!! Thanks!!!!

If your microcontroller course is based on ATmega328P/ATmega2650 MCU and Arduino UNO/MEGA Kit, then this Arduino Forum may be helpful for you to learn the extra things of your keen interest as this Forum remains busy for most of the times on the discussion of real project oriented activities which are not really covered in the academic curriculum.

About C++ Programming: In Arduino Platform, the Arduino Custom Programming and C are widely used; the C++ has been covered and kept hidden in the Libraries that come with each of the commercial sensors/devices.

This Book can be downloaded free here:

EDIT: My Apologies I was not aware

Hutkikz:
This Book can be downloaded free here:

I seriously doubt this is a legal download as the book is copyrighted. A significant real cost of illegal downloads is not the direct loss lo the author and publisher, it's the books that don't get written because it's not worth the effort. I enjoy writing, so I continue to do it, but many others don't. One of my publishers says that for every book I get paid for, there are 3 that are downloaded illegally. The publisher employs three full time employees just to track these torrent sites down and issue cease-and-desist orders. However, they usually just open the same web site up under a different URL.

So what's the solution? I don't know. My philosophy is that, if you download a book illegally and find it useful, then buy a copy. If you don't find it useful, don't buy it.

The arduino is programmed in C++ however a C++ course would probably cover a lot of ground not relevant to programming the arduino and miss out a lot of things that you need to know to make pratical use of the microcontroller.

You might be best to get an Uno and a starter kit and just work through the examples. You have to crawl before you can run so don't skip simple things like just making an LED flash.

I seriously doubt this is a legal download as the book is copyrighted.

The Internet Archive is an actual library and member of The American Library Association
Funded by organizations such as:The National Science Foundation, The National Endowment for the Humanities and other well known entities. [ EDIT: Removed link ]

I do not believe this to be an illegal download, but if I am wrong I will gladly remove the link.

Bluenick2100:
The hardware side is simple. Programming is definitely my weakness. This forum is a great help but I want want to have someone teach me the software side all of this.

Well, I'd say don't take it as an elective if you are going to need extra help. The help may not be there and you may wind up with a bad grade on your transcript. Take something that interesting and in which you will do well. You should be able to teach yourself a lot of the basics thru on line sources like forums, tutorials, code examples, and available publications.

Hutkikz:
I do not believe this to be an illegal download, but if I am wrong I will gladly remove the link.

Seven of my books are listed and I know the publishers have not given permission to them to be listed there. By contract, several are out of print and, when that happens, the copyright is passed to me, so I know those are not legal.

Removed

I did, out of curiosity, and some time ago look at the syllabus of an Embedded Systems course run by a university here. It was full of all sorts of boring things like , for example, formal methods for verifying time slots for multi tasking systems. Of course, these things have their place and this is what separates hobby developments from professional/industrial developments. Just be aware that it may not be all practical things like building robots and the like.

Bluenick2100:
Hi, I have an elective to sign up for next semester and I'd like to take a class on microcontroller programming. What is the right class to take?

I presume you can only choose from a small number of options and you have not told us what those options are.

"How to write programs" is more a state of mind than knowledge about any particular programming language.

This video about the FizzBuzz problem is as good an illustration as I have seen. I did not see the solution until it was explained but then I realized I have used the technique several times in my own programs. At least in my head, there is a different thought process when trying to figure out the answer to a posed question compared to creating something of my own.

My first encounter with programming was a class about very simple programming using assembler language. I reckon that gives you a good understanding of how computers actually work - knowledge that helps with understanding most programming tasks in any language.

Being able to see how programming concepts in one project or program can form the basis of a solution to what at first seemed like a very different problem is also a key skill IMHO.

...R

I echo what Robin wrote. Programming is a way of solving a problem or several problems. The language used is just a tool to implement that solution. Any "programming" class will be of benfit.

Paul

econjack:
Seven of my books are listed and I know the publishers have not given permission to them to be listed there. By contract, several are out of print and, when that happens, the copyright is passed to me, so I know those are not legal.

Well, copyright law allows brick-and-mortar libraries to lend out books without permission from the copyright owner, so the law might also allow online libraries to do the same, which means it's entirely possible the Internet Archive is doing so legitimately.

(I would say it's likely to be legitimate since the Internet Archive is a very well-known and well-respected organization, not just some shady pirate site.)

christop:
Well, copyright law allows brick-and-mortar libraries to lend out books without permission from the copyright owner, so the law might also allow online libraries to do the same, which means it’s entirely possible the Internet Archive is doing so legitimately.

But brick libraries can only lend out as many books as they have bought.

TheMemberFormerlyKnownAsAWOL:
But brick libraries can only lend out as many books as they have bought.

Online libraries can do the same, which seems to be the case with IA (you have to wait to "borrow" a book if all copies are already "borrowed").

See Wasted: A case study for controlled digital lending