microrobotics icon

Untitled

microrobotics | PRO | 05/02/26 06:56:11 PM UTC | 0 ⭐ | 8998 👁️ | Never ⏰ | []
Arduino |

520 B

|

None

|

0 👍

/

0 👎

int dataPin = 9;   // SER
int clockPin = 8;  // SRCLK
int latchPin = 4;  // RCLK
 
void setup() {
  pinMode(dataPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(latchPin, OUTPUT);
}
 
void loop() {
  // All LEDs ON
  digitalWrite(latchPin, LOW);
  shiftOut(dataPin, clockPin, MSBFIRST, 255); // 11111111
  digitalWrite(latchPin, HIGH);
  delay(1000);
 
  // All LEDs OFF
  digitalWrite(latchPin, LOW);
  shiftOut(dataPin, clockPin, MSBFIRST, 0);   // 00000000
  digitalWrite(latchPin, HIGH);
  delay(1000);
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎