Little Rover

Project tutorial by Jeremie

  • 25 respects

Ugly Bug

Project tutorial by Jeremie

  • 59 respects

OldArduiPhone (or the Hipster Cellphone!)

Project showcase by Jeremie

  • 51 respects

Arduino Calculator

Project tutorial by 123samridhgarg

  • 51 respects

SnowPlow Robot

Project tutorial by Vittorio Loschiavo

  • 53 respects

Arduino Two Ultrasonic Sensor Radar - 360 degrees Rotation

Project showcase by MicroLab Greece

  • 59 respects

  • Arduino Game By LCD over 1 year ago

    Your button might be the issue. You could try adding a 1k resistor between the button and pin 2 to clean the signal. Also make sure that all the wires of the screen are nicely out of the way of the button wires to avoid electromagnetic interferences.

  • OldArduiPhone (or the Hipster Cellphone!) over 2 years ago

    Hi Kristian,
    300001 indicates that the pulse has timed out. (Timeout is set to 300000ms)
    If you're using my code, it's most likely a wiring problem. If you're writing your own and using the standard digitalRead and PulseIn that's more or less to be expected... :)

    If your dial works like mine, you should be able to see which side has the activation switch and which has the pulse by looking at it when you activate it. The one will close and stay steady until the dial has come back fully. The other will go nuts :)

    It's a little hard to figure out what you're seeing but on my dial, the 2 switches are on each side of the dial. If you look at the 3rd picture above, the brown and pink wires are actually connected to each other internally so the pink is useless.
    The brown wire is connected to positive. The other 2 are connected to Arduino input ports. pin 2 for the activation (steady) switch and pin 3 for the pulse (nuts) switch. the resistors on the circuit are pull-down resistors (to clean the signal)
    The dial I have works this way,
    When the dial is at rest, the brown-grey switch it off (so the input pin reads 0 there)
    When you start turning the dial, the brown-grey connection closes (the pin reads 1), the pink-orange connection closes too. The pulse is actually read when that switches open and the count stops when it closes again.

    On the fritzing diagram, the grey and orange wires match the grey and orange wires on my dial, the red wire on the bottom right goes to the brown (or pink) wire on the dial. Unfortunately, if you have different colours you'll have to work out the correct colour replacements.

    Hope this helps a bit,
    If not, PM me with some pics so I can try to see what we're looking at.

    Have fun!

  • Arduino Game By LCD over 2 years ago

    Awesome project!
    And I now finally have a good example of how to use interrupts. Thanks for that!

Add projectSign up / Login