<div dir="ltr">My fritzing diagram. It doesn't work, but it is as close as I could get.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 17 March 2018 at 20:01, Ken McKinnon <span dir="ltr"><<a href="mailto:klmckinnon@rogers.com" target="_blank">klmckinnon@rogers.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <p>I think if you might help yourself (and us) by using a graphic
      circuit drawing tool like fritzing which is a circuit drawing tool
      that (I think) was made for the arduino landscape.</p>
    <p><a class="m_-5172930057643554587moz-txt-link-freetext" href="http://fritzing.org/home/" target="_blank">http://fritzing.org/home/</a></p>
    <p>Trying to picture your cicuit based on what you describe is a bit
      difficult.  At best, I can think that your PIR might need a
      pull-up for the input, and I'm not sure why you need a mosfet and
      a transistor..?<br>
    </p>
    <p>Your code looks OK at a first glance, pretty basic, but OK.  Of
      course, you are wasting a lot of horsepower for a circuit that
      could be handled by a 8 pin 555 timer IC, but ... <br>
    </p>
    <p>Ken<br>
    </p>
    <p><br>
    </p>
    <br>
    <div class="m_-5172930057643554587moz-cite-prefix">On 2018-03-17 3:10 PM, Bruce Harding
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div>Hello,<br>
                      <br>
                      I'm trying to get the pinning right for a project
                      where a PIR triggers a LED strip to turn on.  I'm
                      having real trouble getting the pinning on the
                      breadboard right. If someone is willing to take a
                      look at it I'd be grateful. Beer or coffee on me.<br>
                      <br>
                    </div>
                    I'm using:<br>
                    <br>
                  </div>
                  12v 3A power supply<br>
                </div>
                PIR<br>
              </div>
              IRF540 Mosfet<br>
            </div>
            PN2222 Transistor<br>
          </div>
          1m Warm/White LED Strip<br>
        </div>
        Arduino Uno<br clear="all">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div>
                      <div><br>
                        <br>
                      </div>
                      <div>Code:<br>
                        <br>
                        //constants<br>
                        const int ledPin = 5;<br>
                        const int sensorPin = 4;<br>
                        const long stayOnPeriod = 900;   // length of
                        time to stay on (in milliseconds)<br>
                        <br>
                        //variables<br>
                        unsigned long turnOffTime = millis();  //Start
                        with the led turned off<br>
                        <br>
                        void setup() {<br>
                          pinMode(ledPin, OUTPUT);<br>
                          pinMode(sensorPin, INPUT);<br>
                        }<br>
                        <br>
                        void loop() {<br>
                          // check if the sensor is detecting then
                        increase the time to stay on.<br>
                          if (digitalRead(sensorPin) == HIGH)<br>
                          {<br>
                            turnOffTime = millis() + stayOnPeriod; 
                        //e.g. 128 + 256 =384<br>
                          }<br>
                          <br>
                          if (turnOffTime > millis())  //384 > 129<br>
                          {<br>
                            digitalWrite(ledPin, HIGH);<br>
                          }<br>
                          else<br>
                          {<br>
                            digitalWrite(ledPin, LOW);<br>
                          }<br>
                        }</div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <br clear="all"><span class="HOEnZb"><font color="#888888">
        <br>
        -- <br>
        <div class="m_-5172930057643554587gmail_signature" data-smartmail="gmail_signature">
          <div dir="ltr"><span>====<br>
              bruce
              <div><a href="http://faintfuzzies.ca" target="_blank">faintfuzzies.ca</a></div>
            </span></div>
        </div>
      </font></span></div><span class="HOEnZb"><font color="#888888">
      <br>
      <fieldset class="m_-5172930057643554587mimeAttachmentHeader"></fieldset>
      <br>
      <pre>______________________________<wbr>_________________
Lab mailing list
1. subscribe <a class="m_-5172930057643554587moz-txt-link-freetext" href="https://artengine.ca/mailman/listinfo/lab" target="_blank">https://artengine.ca/mailman/<wbr>listinfo/lab</a>
2. then email <a class="m_-5172930057643554587moz-txt-link-abbreviated" href="mailto:Lab@artengine.ca" target="_blank">Lab@artengine.ca</a> to send your message to the list</pre>
    </font></span></blockquote>
    <br>
  </div>

</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><span>====<br>bruce<div><a href="http://faintfuzzies.ca" target="_blank">faintfuzzies.ca</a></div></span></div></div>
</div>