Arduino Litho Click Box(s) & Parking Sensor

Arduino Litho Click Box(s) & Parking Sensor

thingiverse

Update 7.18.18 Installed and working after a part failure on 7.18.18 Update 9.30.18 see below If you have any questions, please let me know, and I'll be happy to help you recreate this project or modify it. Also, if you have any suggestions, please let me know; I am always ready to learn! CREATION IN ACTION- https://youtu.be/gJPS7HRmfeo Back Story The overall point of this project was not to make litho boxes but that's what ended up happening. I wanted to make lights that would alert my wife and I to how close our truck was to the wall when parking in the garage. I modified the sensor code off the Arduino website and made some litho boxes to be illuminated by LEDs. The Boxes These boxes turned out to be quite awesome. When making them, I realized they could also be used as a decoration to spell out someone's name or make a cool custom lamp. Each box contains an LED and a wire that runs to the board. The boxes have a passthrough channel so the wires are hidden. Each litho pane slides in without removing the boxes themselves, enabling you to change what appears easily. Be careful when printing as there is a left, right, and middle box. Make sure when connecting your LED that you use a resistor suited for your LED. Litho Panes I used paulbovbel's litho pane customizer in my slicer. I made them 0.75 of the original size. The panes are able to slide into the boxes without removing the boxes themselves, enabling you to change what appears easily. Thank you, paulbovbl! Here is a link to his page: http://bit.ly/SWEETLITHO Not Included I did print a case for the Arduino and the ultrasonic sensors; however, since I didn't make these, I will not include the files. A quick search and you'll find many suited to your needs. UPDATE I added a picture of the schematics for an Uno, keep in mind that the code below is for a Mega. You only need to redefine the Echo and Trigger pins for the Uno. I also have the code for both if you would like it. I am thinking about adding in a garage door sensor to tell when it's in the up position. Code for Arduino I used the MEGA but this can be adapted for almost all of the Arduinos. You may need to redefine the pins in the code. I also uploaded the code below: // Define the pin connections const int ledPin = 13; // LED connected to digital pin 13 const int echoPin = 8; // Echo Pin of Ultrasonic Sensor connected to digital pin 8 const int trigPin = 9; // Trigger Pin of Ultrasonic Sensor connected to digital pin 9 void setup() { pinMode(ledPin, OUTPUT); // Set the LED as an output pinMode(echoPin, INPUT); // Set the Echo Pin as an input pinMode(trigPin, OUTPUT); // Set the Trigger Pin as an output Serial.begin(9600); // Start serial communication at 9600 bps } void loop() { long distance = measureDistance(); // Measure the distance if (distance > 13 && distance < 200) { // Green light on digitalWrite(ledPin, HIGH); } else { digitalWrite(ledPin, LOW); } if (distance > 13 && distance < 125) { // Green2 light on digitalWrite(echoPin, HIGH); } else { digitalWrite(echoPin, LOW); } if (distance > 13 && distance < 100) { // Yellow1 light on digitalWrite(trigPin, HIGH); } else { digitalWrite(trigPin, LOW); } if (distance > 13 && distance < 50) { // Yellow2 light on digitalWrite(echoPin, HIGH); } else { digitalWrite(echoPin, LOW); } if (distance > 13 && distance < 30) { // Red1 light on digitalWrite(trigPin, HIGH); } else { digitalWrite(trigPin, LOW); } if (distance > 13 && distance < 20) { // Red2 light on digitalWrite(echoPin, HIGH); } else { digitalWrite(echoPin, LOW); } Serial.print(distance); Serial.println(" cm"); delay(100); // Wait for 100 milliseconds before taking the next measurement } long measureDistance() { long duration; // Variable to store the duration of time in microseconds digitalWrite(trigPin, LOW); // Make the trigger pin low delayMicroseconds(2); // Wait for 2 microseconds digitalWrite(trigPin, HIGH); // Make the trigger pin high duration = pulseIn(echoPin, HIGH); // Measure the duration between the rising and falling edges of the echo signal return (duration / 29.1); // Convert the duration to distance in centimeters }

Download Model from thingiverse

With this file you will be able to print Arduino Litho Click Box(s) & Parking Sensor with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Arduino Litho Click Box(s) & Parking Sensor .