Project # 1: Dice roller

Original publication date: Dec. 22, 2015

So the plan is to make a simple dice roller application.

Possible difficulties:

Continued...

I didn't get the chance to work on this yesterday due to Christmas preparations but today I got a couple of hours playing with the Micro:bit again :)

Back to detecting dice rolling, turns out this wasn't too hard but I did need to play a little bit with calibrating the thresholds for detecting consecutive changes in acceleration. There are probably more precise ways to do this, but it works for now!

I created a repo for the rest of the Micro:bit projects and this is the code for the dice roller.

dice roller demo

I just realised this is very similar to what Martin O'Hanlon did with his 8-ball shuffle, our solution was actually pretty similar. I had to add some time thresholds as well, otherwise the shake event ended up happening way too easily and offset.