Advertisement
raiffm21

Shift Register Numbers

Jan 17th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. const int ser = 8;
  2. const int latch = 9;
  3. const int clk = 10;
  4. int Mandy [10] = {63, 5, 91, 79, 101, 110, 126, 7, 127, 103};
  5. void setup() {
  6. pinMode (ser, OUTPUT);
  7. pinMode (latch, OUTPUT);
  8. pinMode (clk, OUTPUT);
  9. }
  10.  
  11. void loop() {
  12. for (int i an= 0; i<10; i++)
  13. {
  14. digitalWrite (latch, LOW);
  15. shiftOut (ser, clk, MSBFIRST, Mandy [i]);
  16. digitalWrite (latch, HIGH);
  17. delay (2000);
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement