I made a Rotary Phone Lamp that turns on when you dial Jenny for the

Поділитися
Вставка
  • Опубліковано 27 лис 2024

КОМЕНТАРІ • 104

  • @FlippinRejects
    @FlippinRejects  4 роки тому +3

    This is the code we ended up with
    #define PULSEPIN 3 // Pulse Pin To Digital Pin 3
    #define SIGNALPIN 7 // Signal Pin To Digital Pin 7
    #define LED LED_BUILTIN // Working With The LED Built In
    #define CODELENGTH 7 // Define how many digits the code is
    #define RELAYPIN 8
    #define RESET 9
    const int secretCode[CODELENGTH] = // Array to hold the secret code - each element should contain one digit 0-9
    {8,6,7,5,3,0,9};
    const unsigned long debounceDelay = 100; // Debounce time - the time used to make sure terminal contact bouncing doesn't produce false events
    const int d=70; // The Delay Time For LED To Blink At The Wrong Password
    // Working variables used to keep track of the counts always start at 0
    int codeDigits[CODELENGTH] = // Array to store received integers
    {0,0,0,0,0,0,0};
    int currentDigit=0; // Var to keep track of which digig in the array we are on
    int pulseCount=0; // Var to keep track on how many pulses in the current digit have been counted
    bool pulseTriggered=false; // Var to keep track of if the current pulse has been counted
    unsigned long lastDebounceTime = 0; // Var to hold the last time the pulse pin was toggled
    bool ledState = false; // Var to hold the current LED state
    bool previousSignalState = false; // Var to keep track of when we transition out of a dialed digit
    void setup(){
    Serial.begin(9600); // Start Serial connection for print commands
    pinMode(PULSEPIN,INPUT_PULLUP); // Define the pin mode for the dialer pulse pin
    pinMode(SIGNALPIN,INPUT_PULLUP); // Define the pin mode for the dialer signal pin
    pinMode(RESET,INPUT_PULLUP);
    pinMode(LED,OUTPUT); //led As OUTPUT
    pinMode(RELAYPIN,OUTPUT);
    digitalWrite(LED,LOW); // Make sure that the LED is off on startup
    digitalWrite(RELAYPIN,LOW);
    }
    void loop(){
    /*
    * Read the states of the current pulse and signal pins into temp working variables.
    * Since the inputs are active low (0v is an active true state), these variable take
    * on the oppisite state (are inverted) so that the code logic is more readable.
    *
    * If the circuite is setup as active high then remove the not symbol (!) and change
    * the pinmode of PULSEPIN and SIGNALPIN in the setup loop to INPUT.
    */
    bool pulse = digitalRead(PULSEPIN);
    bool sig = !(digitalRead(SIGNALPIN));
    bool reset = !(digitalRead(RESET));
    if (reset==true){
    digitalWrite(RELAYPIN,LOW);
    for (int i=0; i < CODELENGTH; i++){
    codeDigits[i] = 0;
    }
    currentDigit=0; // Var to keep track of which digig in the array we are on
    pulseCount=0; // Var to keep track on how many pulses in the current digit have been counted
    pulseTriggered=false; // Var to keep track of if the current pulse has been counted
    ledState = false; // Var to hold the current LED state
    previousSignalState = false; // Var to keep track of when we transition out of a dialed digit
    }
    /*
    * First, see if the signal line is activated. If it is then test to see if a pulse
    * has been detected that wasn't already detected and isn't a bounce of the mechanical contacts.

    */
    if (sig == true){
    //Serial.print("processing signal"); Serial.print(" ");Serial.println(pulse);
    if ((pulse == true) && (pulseTriggered == false)){
    //Serial.println(pulse);
    if ((millis() - lastDebounceTime) > debounceDelay){
    pulseCount++; // Add one(1) to the pulse count variable
    lastDebounceTime = millis();
    pulseTriggered=true;
    }
    }
    /*
    * if the signal line and pulse trigger are activated but the pulse line is not
    * then we need to reset the trigger for the next pulse
    */
    if ((pulse == false) && (pulseTriggered == true)){
    pulseTriggered=false;
    }
    previousSignalState = true;
    } else {
    /*
    * If the signal line is not active then either nothing is happening or we just
    * ended the number and the pulse count is our digit. First check to see if the
    * signa line was previously activated and if so set the current digit in the array
    * then, increment and reset counts
    * Valid pulse count are 1-10 and if there are pulse counts below 1 or greater
    * than 10, ignore them
    */
    if (previousSignalState == true){
    //Serial.println(pulseCount);
    if (pulseCount == 10){
    codeDigits[currentDigit]=0;
    }
    if (pulseCount < 10){
    if (pulseCount > 0){
    codeDigits[currentDigit]=pulseCount;
    }
    }
    /*
    * Next increment the digit count and reset the pulse count and trigger
    */
    currentDigit++;
    pulseCount=0;
    pulseTriggered=false;
    previousSignalState = false;
    }
    }
    if (currentDigit > (CODELENGTH - 1)){
    //test and reset
    //Serial.println("test");
    bool codeCompare = true;
    for (int i=0; i < CODELENGTH; i++){
    if (secretCode[i] != codeDigits[i]){
    codeCompare = false;
    }
    codeDigits[i] = 0;
    }
    currentDigit=0;
    if (codeCompare == true){
    Serial.println("Correct");
    correctCode();
    } else{
    Serial.println("fail");
    falseCode();
    }
    }
    }
    void correctCode(){ // Function that exectures when the correct code is entered
    if (ledState == false){
    digitalWrite(RELAYPIN,HIGH);
    ledState = true;
    } else {
    digitalWrite(RELAYPIN,LOW);
    ledState = false;
    }
    }
    void falseCode(){ // Function that executes if the wrong code is entered
    for(int j=0;j

  • @BruceAUlrich
    @BruceAUlrich 4 роки тому +5

    Best one yet! I really like how you have to dial in a special number to get it to turn on and then hanging up turns it off!

    • @FlippinRejects
      @FlippinRejects  4 роки тому

      Thanks Bruce. This one came out exactly how I pictured it in my head, which rarely happens to be honest.

  • @lorennason2450
    @lorennason2450 4 роки тому +6

    This is an excellent piece. The dialing to turn on the lamp is very unique

  • @rexracer537
    @rexracer537 8 місяців тому +1

    If ur a certain age you couldn't forget that number even if you wanted to. Damn you Tommy Tutone😵‍💫

    • @FlippinRejects
      @FlippinRejects  8 місяців тому

      Absolutely. Thanks for checking out the video.

  • @aweirdguynamedjeff
    @aweirdguynamedjeff 4 роки тому +3

    I love lamp!

  • @crashmalibu5883
    @crashmalibu5883 4 роки тому +2

    Genius use of the dial and the hang up buttons as the switches. Most excellent build. The lamp using the sun reflector 😎 killed me. 🤣

  • @RLLWoodworks
    @RLLWoodworks 4 роки тому +3

    Dude! This turned out sooo cool. How creative! Nice job working through the coding issues. Well done sir! Oh and we're neighbors.

    • @FlippinRejects
      @FlippinRejects  4 роки тому +1

      Thank you so much. Coding always gives me nightmares. Awesome that we are close. We should collaborate sometime. Thanks for watching.

    • @FlippinRejects
      @FlippinRejects  4 роки тому +1

      Checked out your channel. Subscribed. My wife works over in palliative care at Vandy.

    • @RLLWoodworks
      @RLLWoodworks 4 роки тому +1

      @@FlippinRejects no way that's awesome! Let's definitely do something together.

  • @sithich
    @sithich 2 роки тому +1

    I have been having on to my bright orange rotary airplane phone for 30 years ....40 years now. This is perfect,

  • @AndyCPugh
    @AndyCPugh 4 роки тому +2

    Nice lamp!! So very cool.

  • @TheGrantAlexander
    @TheGrantAlexander 4 роки тому +2

    Haha can't wait to get more updates on the stock tan line 🤣🤣 awesome build Shane! I love how the off switch is the hang up button. 😎 So cool 👍🍻

    • @FlippinRejects
      @FlippinRejects  4 роки тому +1

      Thank you. I figured, even if you were the only one to get that reference, it was worth it.

    • @TheGrantAlexander
      @TheGrantAlexander 4 роки тому +2

      @@FlippinRejects I am sure others will get the reference, it was pretty blinding in your last video 🤣🤣🤣

  • @RickyTickyTshirt
    @RickyTickyTshirt 2 роки тому +1

    Love it..adding to my todo list...and I snicker at the peeps that don't get the "Jenny" connection...even if your a millennial you'd of thought the song would have passed by them at some point...

  • @barrymcalister1994
    @barrymcalister1994 4 роки тому +2

    I love this, Shane!!

  • @daverondini1281
    @daverondini1281 4 роки тому +2

    Cool, great Idea!

    • @FlippinRejects
      @FlippinRejects  4 роки тому

      Thank you. Thanks for checking out the video.

  • @PiotrPoźniak-v8n
    @PiotrPoźniak-v8n Рік тому +1

    zły projekt to jest niszczenie starej unikatowej techniki!!!

  • @RichcreekMusic
    @RichcreekMusic 4 роки тому +2

    Very cool!

  • @andrewlhoover
    @andrewlhoover 4 роки тому +2

    Nice!
    I love how it turned out! Great idea using the handle plunger as the off button.

  • @diplayball
    @diplayball 4 роки тому +2

    Amazing work😮😮👍

  • @NortelGeek
    @NortelGeek 2 роки тому +1

    Pristine condition phone! Great find and awesome lamp.

    • @FlippinRejects
      @FlippinRejects  2 роки тому +1

      Thank you for checking out the video.

    • @NortelGeek
      @NortelGeek 2 роки тому +1

      @@FlippinRejects My pleasure! I really love what you've done and hope you'll give some thought to my "sleep timer" idea. :) I'm a telecom enthusiast and collector myself and love to see new life put into those devices that served us tirelessly.

  • @johnpimentel7131
    @johnpimentel7131 3 роки тому +1

    Thanks Flippin Rejects for the code and the inspiration. I was able to make to make a similar lamp and added a wifi arduino so I could also power on and off the lamp using my smartphone. Keep on making these videos.

    • @FlippinRejects
      @FlippinRejects  3 роки тому

      That sounds awesome. Great job. Thank you for the comment.

  • @EthanCarterDesigns
    @EthanCarterDesigns 4 роки тому +3

    So flippin cool man! Using the phone number as the on "switch" is brilliant! Haha can't have those sock tan lines for sure!

    • @FlippinRejects
      @FlippinRejects  4 роки тому +1

      Haha. Thank you so much. This one turned out just the way I had hoped. In my rain stick videos ending to was brought to my attention that my feet and ankles were beyond pale. You gotta do what you gotta do. Thanks for watching

  • @BearMaked
    @BearMaked 4 роки тому +2

    That is very cool!

  • @Bre1002.
    @Bre1002. Рік тому +1

    I LOVE this idea so much!!!!

    • @FlippinRejects
      @FlippinRejects  Рік тому

      Thank you so much for checking out the video. Have a great day.

  • @medihedayati9132
    @medihedayati9132 4 роки тому +2

    I’m impressed.very clever.great job

  • @Newidude
    @Newidude 4 роки тому +2

    Love it 👍

  • @dean_duplantis
    @dean_duplantis 4 роки тому +2

    When I saw the IG photo, I couldn't figure out how you did the cord. Pipe! Very clever

    • @FlippinRejects
      @FlippinRejects  4 роки тому

      Thank you for checking it out. Brass tubing is pretty useful in this type of situation. Very easy to bend, but even easier to bend too much. Thanks for subscribing as well.

  • @SunflowersandDIYing
    @SunflowersandDIYing 4 роки тому +2

    Tht is awesome!

  • @ArtisanShopCA
    @ArtisanShopCA 4 роки тому +1

    Wow, that's super cool! I just posted a video of making one too, although my switch is also the dial, it is not quite elaborate as yours! Thanks for sharing!

    • @FlippinRejects
      @FlippinRejects  4 роки тому

      Super cool. I will check it out. Old rotary phones are awesome. Thanks for checking out my video.

  • @samuraikaoss1455
    @samuraikaoss1455 2 роки тому +1

    That's awesome!

  • @joergdaliborsternberger9201
    @joergdaliborsternberger9201 Рік тому +1

    Oh mann das ist sowas von 😎 cool Top Arbeit

  • @jbjams9461
    @jbjams9461 Рік тому +1

    aye! this is so cool! (this is brooks)

  • @MakerCuisine
    @MakerCuisine 4 роки тому +2

    Incredible amount of engineering in this project, it came out looking fantastic man🤘🤘🤘 great job

    • @FlippinRejects
      @FlippinRejects  4 роки тому +1

      Thank you so much. I had a lot of help on the coding side as my coding skills are in need of an upgrade. Thanks for checking it out and subscribing.

    • @MakerCuisine
      @MakerCuisine 4 роки тому +1

      @@FlippinRejects makers helping makers is what I'm all about, thank you for subscribing too

    • @FlippinRejects
      @FlippinRejects  4 роки тому +1

      Checked out the Maker Mystery Collab video. That is such a cool concept. Looking forward to watching more of your videos.

    • @MakerCuisine
      @MakerCuisine 4 роки тому +1

      @@FlippinRejects thank you very much, it was a fun challenge

  • @paulcbarranco
    @paulcbarranco 10 місяців тому +1

    great build! would you mind sharing where you got the lights from?

    • @FlippinRejects
      @FlippinRejects  10 місяців тому

      Thank you for checking out the video. I got the lights from my local Lowes, but these are similar and would work. Feit Electric BPXNFTD/2/RP Xenon 20-Watt MR11 Halogen Light Bulb a.co/d/aPIl95n

    • @paulcbarranco
      @paulcbarranco 10 місяців тому

      @@FlippinRejects awesome. Thank you !!

  • @AuntDebbie-z6f
    @AuntDebbie-z6f 9 місяців тому +1

    I’m gonna try it!!!
    From Oklahoma
    Aunt debi

  • @oxicatblack4626
    @oxicatblack4626 2 роки тому +1

    very ingenuos!!!my friend
    now!put the info how it works ok.
    now that will be dandy!!!

    • @FlippinRejects
      @FlippinRejects  2 роки тому

      Thanks for checking it out. The code for the arduino is pinned here in the comments.

  • @JonathanRansom
    @JonathanRansom 4 роки тому +2

    How'd you read the numbers from the dial with the Arduino?

  • @stephaneverstraeten4210
    @stephaneverstraeten4210 3 роки тому

    This is awesome !!!!! How do you wire the power to allow you to switch off the light when you hang up ?

  • @Part_121
    @Part_121 3 роки тому +2

    Any hints as to what kind of LED bulbs those are? IE either a part number or Amazon link? Just searching for small LED spotlight on Amazon is not turning up anything useful.

    • @FlippinRejects
      @FlippinRejects  3 роки тому +1

      I used some small xenon bulbs I bought from my local Lowes similar to this link Feit Electric BPXNFTD/2 Xenon 20-Watt Halogen MR11 Bulb www.amazon.com/dp/B0031AJZL6/ref=cm_sw_r_cp_apa_i_2TA46DA88546BW9ATNS2
      But you could look at car under chassis or rock lights that are LEDs. Just make sure they are small enough. There isn't too much room in the handset once you start running wires. Hope that helps. Thanks for checking this out.

    • @Part_121
      @Part_121 3 роки тому +1

      @@FlippinRejects Thank you very much for the reply!

    • @FlippinRejects
      @FlippinRejects  3 роки тому

      @@Part_121 no problem

    • @christopherzimmerman5104
      @christopherzimmerman5104 3 роки тому

      @@FlippinRejects This is where I have been coming up short too. Finding bulbs that will fit just right. Thanks.

  • @jamiefriend2323
    @jamiefriend2323 8 місяців тому +1

    What type of lights did you use?

    • @FlippinRejects
      @FlippinRejects  8 місяців тому

      Thank you for checking out the video. I got the lights from my local Lowes, but these are similar and would work. Feit Electric BPXNFTD/2/RP Xenon 20-Watt MR11 Halogen Light Bulb a.co/d/aPIl95n

  • @w4s100
    @w4s100 3 роки тому +1

    Awesome

  • @jonhatton4354
    @jonhatton4354 4 роки тому +2

    That’s really cool! Is it wired to the original rotary switch or is that a new part added?

    • @FlippinRejects
      @FlippinRejects  4 роки тому +1

      It is wired to the original rotary dialer. Thank you for watching.

    • @jonhatton4354
      @jonhatton4354 4 роки тому +1

      Flippin Rejects very cool! Would love to know how THAT part was done

    • @FlippinRejects
      @FlippinRejects  4 роки тому +1

      There are 4 wires from the rotary dialer. Two are for the pulses ( each number) then the other two open when the dialer stops. They are all tied into the arduino at different pins. The code uses a pulse counter to tell what number is being dialed.

    • @jonhatton4354
      @jonhatton4354 4 роки тому +1

      Flippin Rejects genius

  • @tekilaz1367
    @tekilaz1367 3 роки тому +1

    Hi, congrats it's an amazing project ! I have several quesitons for you !
    Could you please give us more information about your hardware parts ?
    There is 4 wire from rotatary encoder to ardnuino, ok.
    But i dont undersand how to power on you GU10 lamp. You said you use an 5V relay. So you are using LED buld 5V?
    is it possible to have a detail scheme for the electronics part and a list from hardware parts?
    sorry dude, many quesitons but .. REALLY AWESOME :) Need one :)

    • @FlippinRejects
      @FlippinRejects  3 роки тому +1

      Thanks for watching. Outside of what I have put in the video, I don't have a schematic drawing or anything. I make these projects up as I go and I tend to not be very organized.

  • @adamdipietro
    @adamdipietro 4 роки тому

    Is there a way we can look at the code you wrote? I’m inspired to create one of my own. I may be an engineer, but alas I’m no programmer.

    • @FlippinRejects
      @FlippinRejects  4 роки тому +1

      I will try and pin a comment with the code in it. Thanks for watching, and let me know how it goes.

  • @MarkMphonoman
    @MarkMphonoman 4 роки тому +2

    Would you be willing to make one for sale? Thanks, Mark

    • @FlippinRejects
      @FlippinRejects  4 роки тому +2

      I have thought about that for a while, but I am not sure yet. I may eventually raffle off this one some day, but I have no plans to raffle or sell as of yet. Thanks for checking it out. I guess I did kind of ruin it though.

    • @MarkMphonoman
      @MarkMphonoman 4 роки тому +2

      @@FlippinRejects You didn’t really ruin it. There are millions more out there. The model 500 was the most popular phone ever and there are tons available for collectors. I commend you on your creativity. The phone came out great. I collect vintage phones, that’s why I like your novel light phone. Very, very cool. Stay safe. Mark

    • @simonequattlebaum898
      @simonequattlebaum898 2 роки тому

      I'd love to buy one too!

  • @NortelGeek
    @NortelGeek 2 роки тому +1

    You should make it so that after dialing Jenny, you can enter a number of minutes after which it will turn off...

    • @FlippinRejects
      @FlippinRejects  2 роки тому +1

      I am sure all of that is possible in the code.

    • @NortelGeek
      @NortelGeek 2 роки тому +1

      @@FlippinRejects Oh yeah, the sky's the limit.

  • @roncrate6424
    @roncrate6424 3 роки тому

    how much would you charge me to make that for me?

    • @FlippinRejects
      @FlippinRejects  3 роки тому

      As much of a headache as this one was to build, I don't think I will be building another. Sorry about that.

  • @marcfield1234
    @marcfield1234 Рік тому +1

    Makes me want one