মৌলিক: A prime number toy

Moulick (মৌলিক - Bengali for Prime) is an Arduino powered mathematical toy that endlessly computes primes and shows fun statistics about them as it goes along. Watching primes born was never more exciting, or slow. Moulik  starts from 2 and takes you primally all the way out to 10 decimal digits at a recklessly unsafe speed …

Advertisements

A modification to Bresenham’s algorithm

The whole of last week I found myself staying up late at night writing C++ code to draw animated data displays on a 2.8" LCD screen driven by an Arduino, entranced by the addictingly quick cycle of writing code and putting it on the micro-controller. The tiny size, razor sharp resolution and bright colors of …

Debouncing a touch screen

I was coding up an Arduino app that allows a user to tap and drag on a touch screen to move an object. Everything went great but then I discovered that I could not interpret a drag motion. Whenever I dragged along the touchscreen the system would report that I was actually tapping and letting …

volatile

I love the volatile variable qualifier. I never had to use it until I started playing with an Arduino and so it was double the fun. When you mark a variable volatile you are telling the compiler to make no assumptions about the variable during compilation. For example, in a loop like:   the compiler …