Tilt

This update will cover the attempts I had to get the device working with a tilt sensor. Even before I got started I could tell that this could prove almost fruitless especially now that I’m using the LCD Shield which fits directly onto the Arduino and even though it leaves some pins for other uses, it uses a lot of power and makes harder to build stuff away from the microcontroller. I tried anyway, but taking power from the device to a breadboard just meant that there wasn’t any to power the display. I guess that is how the shield operates – if you use the outer pins then they override the use of what ever is below them.

So I tried to directly put a tilt switch onto the shield/Arduino though pins 2 & 3, as they aren’t in use by the LCD screen. I actually tried a couple of analog pins first but the power levels were too inconstant to get a clear reading. But with the digital pins I was at least to get a reading of either 1 or 0. With that I tried a small test program to switch displaying one of two messages onto the LCD display but the end results of the tests weren’t promising as there was a lot of flickering and neither message was clearly readable.

Still I had to try with the full bits of code that I wanted to switch between and after a lot of tweaking of how and when to check the pin input I manage to get it to display the clock portion of the program very well but it’s not able to fully display and run the snake part. That could be because the Snake program I am using requires a fair about of memory to run or it could be clashes between the keypad reading functions. Whatever the reason is, I won’t be able to solve it now nor will I be able to add more to the project as I am out of time. There will be one more post, concluding this project.

Leave a comment