R tist

  • 153 views
Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
153
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
5
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. DIN 3
  • 2.  int timer = 100;  void loop() { int ledPins[] = {  for (int thisPin = 0; thisPin < 11, 12, 13, 6, 5, 3 }; pinCount; thisPin++) { int pinCount = 6;  digitalWrite(ledPins[thisPin], void setup() { HIGH); int thisPin;  delay(timer); for (int thisPin = 0; thisPin <  digitalWrite(ledPins[thisPin], pinCount; thisPin++) { LOW); pinMode(ledPins[thisPin],  } OUTPUT);  for (int thisPin = pinCount - 1; } thisPin >= 0; thisPin--) { }   digitalWrite(ledPins[thisPin], HIGH);  delay(timer);  digitalWrite(ledPins[thisPin], LOW);  }  }
  • 3.  LM 35 IS USE TO MEASURE TO TEMPERATURE OF SYSTEM.
  • 4.  void setup() { Serial.begin(9600);} voidloop() { int sensorValue = analogRead(A0); Serial.println(sensorV alue, DEC);}
  • 5.  void setup() {  pinMode(2, OUTPUT);  pinMode(3, OUTPUT); // Arduino pin: 2,3,4,5,6,7,8  pinMode(4, OUTPUT); byte seven_seg_digits[10][7] = { {  pinMode(5, OUTPUT); 1,1,1,1,1,1,0 }, // = 0  pinMode(6, OUTPUT); { 0,1,1,0,0,0,0 }, // = 1  pinMode(7, OUTPUT); { 1,1,0,1,1,0,1 }, // = 2  pinMode(8, OUTPUT); { 1,1,1,1,0,0,1 }, // = 3  pinMode(9, OUTPUT); { 0,1,1,0,0,1,1 }, // = 4  writeDot(0); // start with the "dot" off { 1,0,1,1,0,1,1 }, // = 5  } { 1,0,1,1,1,1,1 }, // = 6 { 1,1,1,0,0,0,0 }, // = 7  void writeDot(byte dot) { { 1,1,1,1,1,1,1 }, // = 8  digitalWrite(9, dot); { 1,1,1,0,0,1,1 } // = 9  } };
  • 6.  Void sevenSegWrite(byte  void loop() { digit) {  for (byte count = 10; byte pin = 2; count > 0; --count) { for (byte segCount = 0;  delay(1000); segCount < 7;  sevenSegWrite(count ++segCount) { - 1); digitalWrite(pin,  } seven_seg_digits[digit][  delay(4000); segCount]); } ++pin; }}
  • 7.  int sec1=3; void loop() int sec2=5; { int sec3=6;  sa = int temp=A0; analogRead(temp); int sem;  { int sa;  analogWrite(3,sa); void setup()  analogWrite(5,sa);{  analogWrite(6,sa); pinMode(3, OUTPUT); } pinMode(5, OUTPUT); } pinMode(6, OUTPUT);}