Search Header Logo
Elektronika

Elektronika

Assessment

Presentation

•

Computers, Science

•

10th - 12th Grade

•

Hard

Created by

Ahmad Gazali

FREE Resource

6 Slides • 0 Questions

1

Elektronika

by Ahmad Gazali

2

​Membuat program aplikasi sederhana dengan menggunakan konstanta, variable, operator dan perintah input/output

Tools and materials:

1.    Arduino Uno      1 pc

2.    Breadboard       1 pc

3.    Jumper MM      4 pc

4.    LED                   1 pc

5.    Pushbutton        1 pc

6.    Resistor 330      1 pc​

3

​

​Steps:

1.    Prepare tools and materials

Connect all components:

4

media

5

​Setup

int pinLED = 4;

int pininput = 5;

 

int periksa = 0;

 

void setup() {

  // put your setup code here, to run once:

  pinMode(pinLED, OUTPUT);

  pinMode(pininput, INPUT); 

}

6

​Loop

​void loop() {

  // put your main code here, to run repeatedly:

  digitalWrite(pininput, HIGH);

  periksa = digitalRead(pininput);

  if (periksa == HIGH){

    digitalWrite(pinLED,LOW);

    delay(100);

  }else{

    digitalWrite(pinLED,HIGH);

    delay(100);

  }

}

pattern-tertiary
Elektronika

by Ahmad Gazali

Show answer

Auto Play

Slide 1 / 6

SLIDE