Arithmetic that throws things away
Plus, minus, times, divide and the remainder, printed sum by sum. Why 7 / 3 is 2, why parentheses are not decoration, and a lamp that flashes the answer.
Open it in the simulatorThe language, one idea per lesson, on a board that shows you what your code did.
0 of 13 done
13 lessons in 5 chapters, about 10 hours on a simulated Arduino Uno R3. Free, in your browser, every step checked by the simulator.
Plus, minus, times, divide and the remainder, printed sum by sum. Why 7 / 3 is 2, why parentheses are not decoration, and a lamp that flashes the answer.
Open it in the simulatorA function has a name, parameters and a return type. Three lamps flashed by one function, and two more that answer a question instead of doing a job.
Open it in the simulatorThree lamps written out three times. Pull the idea into a Lamp type and two functions in a header file, and the sketch becomes a list and two loops.
Open it in the simulatorA score that goes down on the fifth press and a lamp that goes out when it should stay on. Find it from what the board prints, not from staring at the code.
Open it in the simulatorEach lesson opens when the one before it is done, and each chapter ends in a project.
Statements in order, a box with a type, and arithmetic that throws things away.
setup() once, loop() for ever, a statement per line. Run it, read what it says, change one line, and break it on purpose to meet the compiler.
0 of 6 steps
A box with a name, a type and a value. On this board an int is two bytes, and the sketch shows what happens when a number does not fit.
0 of 7 steps
Plus, minus, times, divide and the remainder, printed sum by sum. Why 7 / 3 is 2, why parentheses are not decoration, and a lamp that flashes the answer.
0 of 7 steps
One branch runs, a loop walks a list, and a function is written once.
if, else if and else pick one of three lamps from a button and the clock. The order of the chain matters, and one = where you meant two is the oldest bug in C.
0 of 7 steps
Eight patterns in an array, walked by a for loop and shown on eight lamps through a shift register. Where the counting starts, where it stops, and what is past the end.
0 of 6 steps
A function has a name, parameters and a return type. Three lamps flashed by one function, and two more that answer a question instead of doing a job.
0 of 6 steps
Where a variable lives, which things belong together, and a header of your own.
A pointer holds an address. The & and * operators, a function that really changes the caller's variable, and why an array is handed over as a pointer.
0 of 7 steps
A struct gives one name to the pieces that make up one thing. Three lamps, each with a pin, a rate, a last time and a state, in one array instead of twelve loose variables.
0 of 6 steps
Three lamps written out three times. Pull the idea into a Lamp type and two functions in a header file, and the sketch becomes a list and two loops.
0 of 6 steps
Timing without waiting, a state machine, and a bug found from its evidence.
Three lamps on three clocks from one loop that never blocks, and a sketch that measures how long its own loop takes. The pattern every real sketch is built on.
0 of 6 steps
A reaction game as four named states and one variable. An enum, one block per state, and a button that moves the machine on. Nothing blocks and nothing is nested.
0 of 8 steps
A score that goes down on the fifth press and a lamp that goes out when it should stay on. Find it from what the board prints, not from staring at the code.
0 of 7 steps
The reaction game, and everything on this path, in something you would show somebody.
The reaction game and everything on this path. Count the rounds, keep the best time, make a false start cost something, then build one of your own.
0 of 6 steps
All 13 lessons, in order, each with what it covers. Any of them opens in the editor right away.
C++ on a board is part of the coding track, a ladder of courses from zero to expert.
Short puzzles on an Uno: one planted fault each, in the wiring or the code. Find it, fix it, and see it work.
Open the next coursePython and C++ from your first print to classes, tests and state machines. Every program runs on a simulated board, so a bug is something you can see.
See every course on the trackEvery lesson runs in the simulator with nothing to buy. When you want the real thing, these kits have the parts.
Pick the starter kit you own and run every lesson in its manual with the same parts on the same pins.
See every kitYes. All 13 lessons of C++ on a board are free and run in your browser, with nothing to install and no parts to buy before you start.
No. Every lesson runs on a simulated Arduino Uno R3 with its parts on the canvas, and the simulator checks each step as you go. When you want to build it for real, the same wiring and code work on a real board.
About 10 hours: 13 lessons in 5 chapters, each one a few short steps. Your progress is kept, so you can stop after any lesson and pick up where you left off.
Each chapter ends in a project that puts it together: Arithmetic that throws things away, Write it once, A header of your own and A bug, found from the evidence.
With "A program is a list", and each lesson builds on the one before it. New to circuits? Electronics basics is the course that starts from zero.