Navigation

    • Register
    • Login
    • Search
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. TinkerTailor
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    TinkerTailor

    @TinkerTailor

    0
    Reputation
    1
    Posts
    1
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online
    Location at Smiley's

    TinkerTailor Follow

    Best posts made by TinkerTailor

    This user hasn't posted anything yet.

    Latest posts made by TinkerTailor

    • Can anyone help me with led strip and distance sensor (similar concept to proximity sensor from the website)

      Hey guys, I just found the proximity / LED ring example on the website as I am trying to do a similar project work with GPS instead of proximity sensor.

      I have a small strip of 7 addressable sk6812 leds and I would like to have them turn on when certain distance has been achieved. I'm looking at the proximity LED ring example but I can't figure out which parts of that sketch could I incorporate in mine.

      I would like to use the LED strip instead and have 3 criterias for 3 preset distances. For example,

      • at 5m turn on led 1 and 2 in blue
      • at 3m turn on led 3 4 5 in yellow
      • at 1m turn all leds in red.

      At the moment I only can use those clunky 5mm leds and void loop looks like this - this turns on the LED if the distance is 5m or less.

              Serial.print(F("Next in range = "));
              Serial.print(shortestDist, 2);
              Serial.println(" m");
              
              if (shortestDist < 5)   
              {
                digitalWrite(ledPin, HIGH);
              }
      
              else
              {                  
                digitalWrite(ledPin, LOW);
              }            
      
          }
          if (gps.charsProcessed() < 10)
              Serial.println(F("No GPS data."));
          last = millis();
          Serial.println();
      posted in Troubleshooting
      TinkerTailor
      TinkerTailor