Snake game on an ARM microcontroller

I’m starting to get accustomed to using an ARM chip and wanted to do a small project. I’ve always enjoyed playing the game of Snake, but never programmed it myself. I present to you Snake on an ARM Cortex-M0 microcontroller.

I’m using the STM32 F0 Discovery board along with a Nokia 3595 cellphone screen. The hardware SPI on the ARM chip makes it pretty easy to address the display. But I’ve written the program to be display agnostic. Keep reading for more details on the programming choices I made.

Continue reading

C Programming Language: shorthand

If you’re writing a lot of code you want to use as few keystrokes as possible. After all, aliments likeĀ tendonitisĀ and carpal tunnel syndrome are career threatening for professional programmers. That’s way many languages have shorthand syntax to save time and keystrokes. The C language is no different, and I’ll share this quick tip about it after the break.

Continue reading