User:Stonestone/TIB

From XPUB & Lens-Based wiki
< User:Stonestone
Revision as of 15:27, 21 January 2016 by Stonestone (talk | contribs) (Created page with " <div style="width:80%; font-family:Courier; padding:2px; float:center;font-size:15;background:#FFFFE0; border:1px solid black"> == LED testing #1 == === Documentation === [...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

LED testing #1

Documentation



Codes

int r1 = 13 ;
int r2 = 12 ;
int r3 = 11 ;
int r4 = 10 ;
int r5 = 9 ;
int r6 = 8 ;
int r7 = 4 ;
int r8 = 3 ;
int r9 = 2 ;
int d = random(300);
void setup() {
  pinMode(r1, OUTPUT);                                                            
  pinMode(r2, OUTPUT);
  pinMode(r3, OUTPUT);
  pinMode(r4, OUTPUT);
  pinMode(r5, OUTPUT);
  pinMode(r6, OUTPUT);
  pinMode(r7, OUTPUT);
  pinMode(r8, OUTPUT);
  pinMode(r9, OUTPUT);
}

void loop(){
  digitalWrite(r1,HIGH);
  delay(d);
  digitalWrite(r1,LOW);
  digitalWrite(r2,HIGH);
  delay(d);
  digitalWrite(r2,LOW);
  digitalWrite(r3,HIGH);
  delay(d);
  digitalWrite(r3,LOW);
  digitalWrite(r4,HIGH);
  delay(d);
  digitalWrite(r4,LOW);
  digitalWrite(r5,HIGH);
  delay(d);
  digitalWrite(r5,LOW);
  digitalWrite(r6,HIGH);
  delay(d);
  digitalWrite(r6,LOW);
  digitalWrite(r7,HIGH);
  delay(d);
  digitalWrite(r7,LOW);
  digitalWrite(r8,HIGH);
  delay(d);
  digitalWrite(r8,LOW);
  digitalWrite(r9,HIGH);
  delay(d);
  digitalWrite(r9,LOW);
}


Problem

  1. 3/4 lights cannot work well. I guess it is because of the connection problem.
  2. Stupid Codes.