Embedded Wednesdays: Characters.

This week Andrei gives an overview of the char type in the C language. C has some issues with character strings and Andrei goes into buffer overflow problems and missing terminators in the strcpy function. This a post that should be read all of the way through by all C programmers. Make sure you can spot the bugs in the code.

Read More

Karaoke Plays Music

I started with simple state machines last week. This week I want to talk about more complex state machines and interrupts. These are software topics but we’ll get back to the hardware soon.

The karaoke buttons that control music playback are far more complicated than either its disco button or the quadcopter’s power on sequence; if you press play on the karaoke, what happens? What if the door is open? What if there is no CD? What if it is already playing?

Read More

On Mechanical Sympathy

Jackie Stewart was the Formula 1 World Driving Champion in 1969, 1971, and 1973. He raced in the Can-Am series (even here in Edmonton) butting heads with the likes of Bruce McLaren himself. 

One thing that Jackie had going for him was that he was smooth. He became a part of the car, they worked together. He worked hard to understand what the car was telling him, and how to get the car adjusted to work with him. He had Mechanical Sympathy.

In computing, we are given operating systems, compilers, databases, and machines. By getting our own version of mechanical sympathy, we can understand what is happening, and use our knowledge to get the maximum out of our systems.

In this post, Andrei goes a little deeper into mechanical sympathy and gives some links to videos and podcasts for your enjoyment.

Read More

Using Inputs and Outputs to Make a Toy

Having considered digital inputs and outputs, you’ve already seen more than 50% of a toy’s hardware. Oh sure, we should talk about the fancier sensors, motor control, and audio outputs but those are one-offs, specific to a toy’s particular function. Many toys don’t have them or only have one; buttons and lights are enough for some toys...


I’ve mentioned the processors in the toys a few times. I can’t show you what is inside the software (partially because the designers sensibly locked out the ability to read the code from their processors). I can show you how to figure out what is in the software without breaking any laws or copy protection.

Read More

Embedded Wednesdays: Floating Point Numbers

In this week's installation of Embedded Wednesdays, Andrei gives an overview of floating point numbers. He goes over a bunch of practical issues that go along with using floats including truncation, and repeating binary patterns.

If you use floats in your program, it may not be doing what you meant. That slow response may just be because - well, read on...

Read More