ASER Lesson 6.5: Raiders-Style Booby Trap
I just threw together this simple mod of the basic trip wire setup. This one is a little better for keeping people from grabbing your stu...
I just threw together this simple mod of the basic trip wire setup. This one is a little better for keeping people from grabbing your stuff. Well, at least to alert you that they've grabbed your stuff.
I've modified the code to use the analog input like we use in the laser trip wire, and I've just rigged up a simple switch with duct tape so that it only closes when you put pressure on it.
It's finicky, but it'd get the job done. Here is the code to make it run.
// the setup routine runs once when you press reset: void setup() { pinMode(13, OUTPUT); } // the loop routine runs over and over again forever: void loop() { // read the input on analog pin 0: int sensorValue = analogRead(A0); // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V): float voltage = sensorValue * (5.0 / 1023.0); // only turn it on if the voltage is less than 4 V if(voltage<4){ digitalWrite(13,HIGH); }else{ digitalWrite(13,LOW); } }
1 comments:
The betting prospects are nearly infinite, especially with trendy progressive titles. The entire experience turns into even more difficult in the case of Live American Roulette which incorporates an extra zero. Furthermore, roulette could be played with native-speaking dealers, in languages corresponding to French, Swedish, Turkish, Russian, 솔 카지노 Danish, Italian, and Hindi.
REPLY