Tilt Sensor

2

As you can see in one of my previous posts, I need to have much further understanding of how the tilt sensor works so I can debug when things go beyond my knowledge.

I poked around to find something that simply describes the sensor I’m working with and found bare bones explanation from a teacher at the School of Creative Media in Hong Kong.

I followed the directions there and did succeed in getting my serial monitor to read the correct outputs – so I know the sensor is working.

Screen Shot 2016-04-02 at 10.13.42 AM

Serial.print(“Photo 1: “); Serial.print(digitalRead(6), DEC); // Display Out 1st value Serial.print(“; “); Serial.print(“Photo 2: “); Serial.println(digitalRead(7), DEC); // Display Out 2nd value

a

So my next step is to see if I can continue the circuit to get different LEDs to light up depending on the sensor’s state.

 

Leave a Reply