We ended our Part 3 article by giving you an assignment that emulates the card game, often called In Between (but better as known Acey Deucey). Recall that the objective of the game was to have the “dealer” turn two cards face up and then have the player bet that the next card would fall “in between” the two face-up cards. Let’s see how close your code came to mine.
While getting the correct answer to a programming problem is crucial when designing a program, it should not be your only objective. You also want to write it with sufficient clarity that someone else can read your code and easily understand what the code does. Let’s take a look at an example program to show the square of a number.
In the previous installment, we discussed the Five Program Steps and how we can use those five steps to organize our thoughts about writing programs. In this article, we’ll discuss the format that the Arduino Integrated Development Environment (IDE) requires for your program to execute in the IDE. We’ll then examine how the IDE allows us to easily organize a program using the Five Program Steps.
An RTOS (Real Time Operating System) is a software component that lets you rapidly switch between different running sections of your code. Think of it as having several loop() functions in an Arduino sketch where they all run at the same time.
Most of us have invested some time in learning those things we want or need to do. Learning how to program is no different, and it can be an extremely satisfying endeavor. Seeing a device respond to code you wrote is, well, intoxicating in a good way. My goal is to create an interest in exploring microcontrollers and encourage you into investing $5 and some of your time into that exploration. I honestly think you'll enjoy the journey.
If you use microcontrollers in your projects, imagine how helpful it would be to see the data in a graphical format, rather than just a series of numbers -- especially when debugging! MakerPlot does all of this and connects directly to your microcontroller’s serial port to display analog and digital data in graphical form; it’s DIY software for your microcontroller projects.
If you’ve written a program for a microcontroller board such as the Arduino, Raspberry Pi, or Propeller QuickStart, you have relied on software libraries that provide constants and functions. Often, we use software libraries without thinking much about them.
When you start to write libraries, it takes time to read documents, follow directions, and experiment with simple functions. Fortunately, after you understand how to create libraries and header files for the software tools you use, you'll have a useful skill that can simplify programming tasks. Even if you never create a library, you probably want to know how they work and what they contain. This tutorial provides information that gives you a good start.