Topics for 10 Part Lesson Plan [Draft]

It’s time to start developing that lesson plan and educational materials we have been talking about! Here is my ideas for a 10 part lesson plan, breaking down the concepts of programming into an easy to follow set of activities.

The intention of the Arduboy lesson plan is not to provide a complete understanding of programming concepts, but more to increase your comfort level with programming. It’s meant as a starting point, that gives you some short cuts to easy to achieve results.

One thing I’ve always thought is fun about programming is the experience of the “Hello World!” application. You can read about it here on wikipedia. It’s the point where you first bring up a system and can actually do something meaningful, display some text. It’s a universal point in virtually any form of software development.

We would like to create similarly impactful learning opportunities with our lessons. The idea is to get someone comfortable changing variables, copying and pasting and ultimately not afraid of error messages in the compiler window. Each lesson will feature links to other similar topics that will expand the learning contained within.

We will not be providing an end-to-end instruction on C++ programming, this isn’t some kind of computer science degree. What we hope to provide is a set of tools that will allow you to start playing with code, get under the hood and start exploring the world with a new perspective on what is possible!

Number Title Concepts Introduced
1 What is programming: Binary, Hexidecimal, Machine Code, C++, Arduino
2 Hello World: Strings, Variables, Functions, Printing to the Screen
3 Drawing: Integers, Drawing Commands, Square, Circle, Line
4 Input Buttons: Input buttons, LED, Variables, Math, Booleans
5 Images: Convert File and Upload
6 Sounds: Convert File and Upload
7 Tic Tac Toe: Game Logic, If Statements
8 Gravity Jump: For and Loop Statements
9 Menu System: Arrays
10 Sample Game: Classes, Bringing all the concepts together

I’ll come in and expand on ideas if people are interested or have questions. Please do comment and give feedback on what you want to see covered! This whole process is open and community sourced so please contribute if you have any ideas!


Looks good to me. Very well thought out.
I recently learnt Java as part of my degree and I’m managing alright but stuff like images, input and sounds would be really helpful for me.
But I think you’re right to put game logic afterwards as people really struggle with that.
Maybe there should be a bit about accessing documentation, reusing other people’s work etc.
I’m not sure where it’d fit in though… maybe it’d be better introduced spread out when relevant to other stuff like the second lesson with functions and the last one with the sample game?
I really wish you luck with this as I find a lack of clear instruction (or direction) is the biggest obstacle to self-learning.

i talk idea with brainstorming.

debug example(screen debug or serial print?). frame rate(what is 60fps). eeprom save/load.
arduino coding style(PROGMEM, F Macro etc…).

1 Like

If you jump in with binary, hex and machine code on the first lesson, there won’t be a second one.

I teach an intro to programming course, and I have found that you have to hook the students first, before you start with the basic concepts.

Here is a suggested starting sequence:

  1. compiler basics and hello world
  2. drawing commands and sounds. Beeps, lines, boxes, circles and imported images.
  3. variables and organization. The need to mange images as variables leads in to the concept of storage and data. While you are at it you show the ulility of using methods to organize things.
  4. Input, looping and comparisons. This is the point where for loops and if statements come out, aided by key input. This is also the point where students can handle some problem solving, and you can start having projects drive the curriculum.

At this point students are hooked. Even the newest of newbies will be willing to tough out the hard stuff now that they see what the end results can be.


That would be cool if there’s a lesson plan, but I think there should also be very simple tutorials, like we have posted by @akkera102 in the Japanese section of the site. These other tutorials are geared more towards people who may already know a programming language and can quickly see how to apply those skills to the Arduboy. If I had something like that when starting with a few platforms I’ve worked with, it would have been nice. Considering we see loops touched more on in the 8th lesson that you’ve proposed, I feel like we can skim over those simple concepts for these tutorials and get straight into the Arduboy-specific concepts. Here’s what I’m thinking…

  1. IDE/Getting Started/Hello World
  2. Input Buttons
  3. LED
  4. Drawing
  5. Images
  6. Sound
  7. EEPROM Writing/Reading
  8. Simple Game
  9. Serial Communication

I’ve also taught programming to very young students. They want to jump right in and they typically don’t care much about the IDE and that kind of stuff. You’ve got to get them hooked with some kind of output. Their (and even my) favorite part of programming is seeing the creation come to life and actually doing something.

1 Like

Ahh… then we are talking about a different category. Bateske (Kevin)'s message suggested that he was leaning towards using the Arduboy as a platform for teaching introductory computer science. In that state the hook is the important bit. Even if your students are older; mine are teenagers.

Drawing on my days as a developer rather than my teacher reflexes… here is what I would want to know right off the bat:

  1. How does the IDE work. How do I set up the Arduboy environment, how to bring in libraries, how to set up a sketch, basic debugging, and sending the sketch to the device. And, any common gotchas encountered along the way.I already know how to program, I just want the quick start guide for the environment and the device.
  2. Give me an example for each major topic. I know how to read code, so a well written and well documented example is all I need. Yes, that means lots of comments in the code.
  3. Keep the examples all in one file. I know it is bad C/C++ programming to have all the #defines and global variables in the same file, but when your struggle is understanding the environment, bouncing between files to get a feel for how things work, triples the difficulty level.
  4. Stay away from optimizations. I don’t want study a line of code for half an hour, and do internet searches to find the meaning of the pointer notation, or the ternary operator. Keep it straight forward and easy to understand. Examples of optimization, both for space and speed, should a separate topic.

Keeping those things in mind, it doesn’t really matter what order you introduce things in a tutorial geared for experienced programmers.


I think there need to be some really basic “copy and paste block” style tutorials so people can make a basic game (no eeprom, or anything complicated) so they can have stuff like (pseudocode)

Draw bitmap
Clear screen

Then add an element

Draw bitmap
Read buttons
Clear screen

Add another

Draw bitmap
Read buttons
Move bitmap
Clear screen

And so on, like scratch but basic includes people can paste into a game loop and see what they do, a lot of tutorials jump into too much detail too quickly and people lose interest or get frustrated.

@akkera102 s tutorials are brilliant so something like that in English would be perfect, when you add something give a very simple explanation, don’t fall into tech speak, that can be for more advanced tutorials.

1 Like

I’m going to agree and disagree with Tachikoma. When it comes to programming there are two things that seems to keep people going. The first is having a reachable goal. Something that is a bit of a challenge, but that a person can accomplish on their own. The second is examples, lots of examples.

Here is where I disagree. I’ve never been a big fan of Scratch. It is too confining. Not flexible enough. And I think those two things limit imagination and the chase-able goals become too simplistic.

Lots of examples, yes. But don’t be afraid to make them complex. While this is a bit of a chore in C/C++ derivative languages, but if you make good use of methods/subroutines, even the most complex code can be be made easy to understand. Easy to take apart. Easy to borrow portions of for your own projects.

Here is the loop method from a game I am currently working:

//Main program loop - Runs once per frame
void loop() {
  if (!(arduboy.nextFrame()))           //Frame delay -- Slow the game down, save the battery
    return;                             //Jump out and try again when it is time for the next frame

  switch (gameMode)                     //Every menu option has its own routine
    case 0: menu();             break;  //The menu
    case 1: playGame();         break;  //The game itself
    case 2: changeSound();      break;  //toggle the sound on and off
    case 3: displayHelp();      break;  //Explain the game
    case 4: displayCredits();   break;  //high score, programming credit
    case 5: displayGameOver();  break;  //After the game, before the menu
    default: playGame();                //Always have a response -- should never be reached.

I plan to use this as an example in my programming courses, so I structured it to allow someone with now C/C++ experience to follow. There are no header files; all the sources are in one place. The loop routine is right at the top of the program (or at least as close to the top as I can manage). In each of those routines is another set of routines that increases the complexity a bit. The student can follow the calls as deeply into the logic as they wish. And they can always come back when they want to learn something new. By using well named methods/subroutines the student can follow the logic without being bogged down the the hieroglyphics that C/C++ code represents.

But they are never outside of straight coding the way you are with scratch.

1 Like

Don’t get me wrong, I think scratch is terrible, my son uses it and it gives the impression of coding without actually knowing anything that they are doing. However, I have seen him do some great things with it, which gives him confidence to move onto something more advanced, we need to look for something between drag and drop and full on object orientation methods. We need lesson plans that break down everything that is being done like @akkera102 s examples, everything you add as you build up an example program needs explaining in context. Hell I would say at the start not even using includes where you could put the entire logic in the main loop, I started programming by using timer events and put every single thing for space invaders or breakout inside one timer event, keep it simple then build up/break it into parts as you go along.

1 Like

If we had the time and resources to start from scratch I would like to see something Small Basic. As friendly as the block coding languages, no type casting like Python, and with no limitations like C/C++.

But, I don’t think any one is going to write a BASIC compiler from scratch.

I will be a little disagreeable again. Putting all the code in loop method might seem like a simple way to start… but if you have never seen code before… or even if you are an accomplished programmer and this is your first time with C/C++, seeing the code all in one place can be overwhelming.

Yes, skip the header files. But also yes, make heave use of subroutines/methods.

1 Like


This is a great discussion. Thank you!

I decided to add a description of the State Transition to the next tutorial.
and Serial Communication too.

I give up a description of the C++ and Arduino coding style.
Maybe, students will be required Google teacher(search ability) :slight_smile:

my tutorial does not have properly explain. Only it is showing the scenery.


That lesson! Some off-shoot lessons should totally be fun stuff that talks about math principles. For sure. :smiley:

Thanks so much for that post @akkera102 :100::100:

1 Like

Note to self:

Don’t drink single malt when posting.

It all made complete sense in my head when I was posting it!


I am spitballing some ideas here, I generally agree with @codingCat on the hooking of students first and how easily it can be to leave them in the dust. I teach a game programming course at the community college here and would really like to ditch C#/XNA in favor of something else (like arduboy).

Background as to the pros and cons of C#:

C# is managed, and with that in mind much easier to use than C/C++ (strings in C# cake!) I start the class off with (kind of boring) console applications before we move into the gaming, but that is the problem the jump from simple hello worlds and temperature converters to an XNA base game is HUGE, this would be the case anywhere to complete new programmers but I wonder how much more difficult it might be with C/C++ as a language as it is more unforgiving to newbs than even C#

But my biggest reason for the switch: Trying to keep up with the times. As of late, microsoft has axed its support for XNA and now most computers (and student laptops) that ship come with windows 10. Getting XNA to run on this is not as cut and dry as it once was and students spend too much time getting this working on their laptops than anything else. In addition to that, it is Windows only and I believe Arduboy is cross platform? Okay now for more random things off the top of my head:

It is a gaming system, so gaming constructs like a game loop and also how images work on a screen would be good items to add somewhere in that lesson plan. In addition to that the section “1 What is programming: Binary, Hexidecimal, Machine Code, C++, Arduino” I would keep light and very high level. I also usually go into a bit on human readable that while C++ might look like greek there are actual words in it one can pick out, unlike the 1s0s etc.

Finally: 10 Sample Game: Classes, Bringing all the concepts together
If we are talking beginners, I would steer clear of classes -or- have a super simple example game that shows it working with and without classes. I have long since dealt with issues in trying to get the concept of classes across to new programmers, and it is just like pulling teeth sometimes (fully aware it might be my approach). In either case, I like the start of these ideas for lessons and also want to reiterate the importance of many different kinds of examples of varying complexity.

Also from an academic standpoint I would like to see quizzes and homework and exercises come out of this :slight_smile: Okay enough of my stream of consciousness blarg to text post.


@Shane_Thomas, what kinds of avenues are you finding young people enjoy most when doing things like online homework. It would be very possible to develop modules for something like WebWork, but I’ve seen students really struggle with platforms like this. Perhaps you have a method you’d like to see these in? Maybe the usual small book and instructor solutions published in the traditional method?

@Shane_Thomas I know it’s getting a bit off topic but have you tried Monogame? It’s an open source version of XNA that’s been updated long past Microsoft’s support. It uses all the same syntax as XNA to the point where you can just change the references/includes from a normal XNA game to Monogame (with a few minor changes) and it’s exactly the same.
I wish my college taught me XNA :stuck_out_tongue:

C#/XNA is pretty clunk stuff. The entire DX situation is pretty rough for a new user, and really teaches you more about IDE maintenance and setup then giving you a chance to explore actual programming ideas out there. I know at OSU I’m seeing more emphasis on using gcc and removing the IDE from the educational process, as that’s really something specific to your workplace/employer/preference, and it does seem to make the process of compilation not as abstract.

Small VMs are being used to great effect these days to give stable development platforms, and this too might be a great way to distribute an educational platform to schools, and spare them the trouble of the setup. But trying do that with an MS product without 8 gigs of ram dedicated to the machine.

I think the key to lessons would be to build a game and that each step gets you closer to that goal.

  1. display graphics - hello world type example
  2. input
  3. move graphics - start to talk about variables x,y positioning
  4. adding enemies - more variables, maybe random functions
  5. collisions - between enemies and player

I think something along these lines as there is a goal and each step ends up being something that can display what you have learnt.

I have trained a lot of people in differing aspects of technology and I have found that this approach works well.

And the simplest game out there ? Pong. It’s very basic, two white lines to move, one little square for a ball and a top and bottom bar to bounce off.

Teach people to write a Pong clone and you’ll have them hooked.

Either that or a simple run and jump clone (like an endless runner / side scroller), with objects that can hit you. You’ve got all the elements, moving left and right, jumping, buildings to run on (thus a surface you need to check), enemies / items to hit and hurt/kill you. Add to that, if you fall off a building / miss a jump, you’ve got a way of ending the game. Add in lives, and a score = winner :slight_smile:

Getting them hooked is the key and the easiest way to get them hooked is to have quick, tangible results.
I remember the first time my app displayed on my phone, after hours of development and lots of swearing, it was awesome.
I agree start simple, maybe display the paddle first, next lesson move the paddle etc.
All the way through mention how this ‘element’ could be used in other types of games.
Maybe have a couple of game coding lessons.
Start with Pong, then another simple game, building on what was learnt in pong, then another slightly more complex one.