Hourglass Project Part-2 (Updates)
The cardboard housing for the hourglass is completed and set aside.
I have also experimented with a simple tilt sensor, its readings are not very accurate, but very easy to use. No library is needed, you simply do an Analog reading and determine if the thing is standing upright or not.
My effort during this time mostly has been on the software side of things. For the modeling of the little balls that will fall thru the hourglass.
I had decided to use C++ which is unusual as I code in straight C for Arduino projects usually, but the modelling of falling balls seemed like a natural fit for an object based approach. As I have not coded in C++ recently, decided to experiment with the modelling on a PC first. (when I tried some of the classes on arduino IDE I also quickly found out that the newer parts of C++14, that I wanted get my hands on is not much of any use in Arduino land, so my code turned back to be C with classes)
The following video shows the result of the modelling and the simulation on PC. For simulation video, it simply pushes out lines of characters to simulate the display, nothing fancier than that.
With few basic class definitions in place and a very crude PC test harness I managed to get an initial validation of my modeling on PC without involving Arduino connections and sensors etc. I will certainly post the full code when it is complete.
The picture below shows the simulation of 3x8x8 LED matrix display (rows 0-23) with an hourglass mask, and a simple arrow at the bottom that shows the direction of gravity applied at that moment. Next step is to test this on arduino and get LedControl and sensor libraries involved (To be continued)