Some pics and a sketch.
The sketch is really dirty, complete with debugging lines commented out but should make sense. It works but is only a start.
The y and z axes are not reading properly but it's the output voltage (the DMM may not be optional) from the accelerometer that is wrong, not the sketch or Arduino part. I may have spiked the accelerometer IC while working without static protection. The x axis works perfectly but does vary enough in the second and third digit value that some averaging (maybe filtering?) might be needed.
The breadboard is something I was playing with a while ago. That is what you will need to do to use a 7-segment display (although neater and arranged to fit on a shield). The 4511 is in the middle. The row of switches are doing what the Arduino will do.
The d and e segments are dimmer because their two current limiting resistors - with the red felt tip pen on the leads - are 1.5k Ohms while the others are (I think - I can't recall exactly and I can't be bothered looking at the colors) 150 Ohms. The blue 7-segment is eye searing (to me at least) using the max. current that it can use, hence trying the higher value resistors.
Last edited by Occasionally6; 05-23-2013 at 01:53 AM..
|