Arduino Litho Click Box(s) & Parking Sensor

Arduino Litho Click Box(s) & Parking Sensor

Description

Update 7.18.18 Installed And Working After A Part Failure 7.18.18 Update 9.30.18 See Below If You Have Any Questions Please Let Me Know And I Would Be Happy To Help You Recreate This Or Modify It. Also, If You Have Any Suggestions Please Let Me Know As 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 Is 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 The Leds. The Boxes: The Boxes Turned Out To Be Quite Awesome. I Realized When I Was Making Them That These Could Also Be Used As A Decoration To Spell Out Someone'S Name Or To Make A Cool Custom Lamp. Each Box Contains A 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 So You Can Change Them Without Removing The Boxes. Be Careful When Printing As There Is A Left, Right And Middle Box. Make Sure That When Connecting Your Led That You Use A Resistor That Is Suited To Your Led. Litho Panes- I Used Paulbovbel Litho Pane Customizer And In My Slicer. I Made Them .75 Of The Original. The Panes, As I Said Above, Are Able To Slide Into The The Boxes Without Removing The Boxes Themselves, Enabeling You To Change What Appears Easlly. Thank You Paulbovbl! Link----> Http://Bit.Ly/Sweetlitho To His Page. Not Included: I Did Print A Case For The Arduino And The Ultrasonic Sensors; However, Since I Did Not Make These I Will Not Include The Files. A Quick Search And You Will 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 Is In The Up Position. Code For Arduino: I Used The Mega But This Can Be Adapted For Almost All Of The Arduinos.You May Have To Redefine The Pins In The Code. I Also Uploaded The .Ino (Arduino Code) File Above. #Define Trigpin 7 #Define Echopin 6 #Define Led 13 #Define Led2 12 #Define Led3 11 #Define Led4 10 #Define Led5 9 #Define Led6 8 Void Setup() { Serial.Begin (9600); Pinmode(Trigpin, Output); Pinmode(Echopin, Input); Pinmode(Led, Output); Pinmode(Led2, Output); Pinmode(Led3, Output); Pinmode(Led4, Output); Pinmode(Led5, Output); Pinmode(Led6, Output); } Void Loop() { Long Duration, Distance; Digitalwrite(Trigpin, Low); Delaymicroseconds(2); Digitalwrite(Trigpin, High); Delaymicroseconds(10); Digitalwrite(Trigpin, Low); Duration = Pulsein(Echopin, High); Distance = (Duration/2) / 29.1; If (Distance > 13 && Distance < 200) { //Green 1 Digitalwrite(Led, High); } Else { Digitalwrite(Led,Low); } If (Distance > 13 && Distance < 125) { //Green2 Digitalwrite(Led2, High); } Else { Digitalwrite(Led2, Low); } If (Distance > 13 && Distance < 100) { //Yellow 1 Digitalwrite(Led3, High); } Else { Digitalwrite(Led3, Low); } If (Distance > 13 && Distance < 50) { //Yellow 2 Digitalwrite(Led4, High); } Else { Digitalwrite(Led4,Low); } If (Distance > 13 && Distance < 30) { //Red1 Digitalwrite(Led5, High); } Else { Digitalwrite(Led5,Low); } If (Distance > 13 && Distance < 20) { //Red2 Digitalwrite(Led6, High); } Else { Digitalwrite(Led6,Low); } If (Distance >=200 || Distance <=13){ Serial.Println("Out Of Range"); } Else { Serial.Print(Distance); Serial.Println(" Cm"); } }

Statistics

Likes

14

Downloads

0

Category

DIY