Programming-Arduino (1) - Pages-99
Programming-Arduino (1) - Pages-99
Data
You are going to build this example a step at a time, starting with the data
structure that you are going to use to represent the codes.
It is important to understand that there is no one solution to this problem.
Different programmers will come up with different ways to solve it. So, it is a
mistake to think to yourself, “I would never have come up with that.” Well, no,
quite possibly you would come up with something different and better. Everyone
thinks in different ways, and this solution happens to be the one that first popped
into the author’s head.
Representing the data is all about finding a way of expressing Table 5-2 in C.
In fact, you are going to split the data into two tables: one for the letters, and one
for the numbers. The data structure for the letters is as follows:
char* letters[] = {
};