Featured

Showing posts with label Arduino. Show all posts
Showing posts with label Arduino. Show all posts

0 Sensor Gerak Anti Pencuri Berbasis Arduino

Project Untuk Kelompok 7





Komponen yang dibutuhkan :
  • Arduino (Versi apapun) >> 1 Buah.
  • Sensor PIR (passive infrared) HC-SR501 >> 1 Buah.
  • Buzzer >> 1 Buah.
  • Led >> 1 Buah.
  • Resistor 1K >> 1 Buah.
  • Kabel >> Seperlunya.

Wiring :

Source Code :
     /*  
      * Generated Code by Kang Kamal  
      * kangkamal.blogspot.com  
      */  
     int pinLed = 13;  
     int buzzer = 8;  
     int pinPIR = 7;  
     int terdeteksi;  
     void setup() {  
      // put your setup code here, to run once:  
      Serial.begin(9600);  
      pinMode(pinLed, OUTPUT);  
      pinMode(buzzer, OUTPUT);  
      pinMode(pinPIR, INPUT);  
      digitalWrite(pinLed, LOW); //Matikan Led  
      digitalWrite(buzzer, LOW); //Matikan Buzzer  
     }  
     void loop() {  
      // put your main code here, to run repeatedly:  
      terdeteksi = digitalRead(pinPIR);  
      if (terdeteksi == HIGH){ //Jika terdeteksi objek bergerak  
       digitalWrite(pinLed, HIGH); //Nyalakan Led  
       digitalWrite(buzzer, HIGH); //Nyalakan Buzzer  
       delay(2000);  
       digitalWrite(pinLed, LOW); //Matikan Led  
       digitalWrite(buzzer, LOW); //Matikan Buzzer  
      }  
      else{  
       digitalWrite(pinLed, LOW); //Matikan Led  
       digitalWrite(buzzer, LOW); //Matikan Buzzer  
      }  
     }  
    
    Read more

    2 Sensor Pendeteksi Kekeruhan Air Berbasis Arduino

    Project Untuk Kelompok 6




    Komponen yang dibutuhkan :
    • Arduino (Versi apapun) >> 1 Buah.
    • LDR >> 1 Buah.
    • LED ukuran 5mm warna putih terang >> 3 Buah.
    • Resistor 1K >> 2 Buah.
    • Kabel >> Seperlunya.

    Wiring :

    Source Code :
       /*  
        * Generated Code by Kang Kamal  
        * kangkamal.blogspot.com  
        */  
       int led1 = 10;  
       int led2 = 11;  
       int led3 = 12;  
       int pinLDR = A0;  
       int data = 0;  
       void setup() {  
        // put your setup code here, to run once:  
        Serial.begin(9600);  
        pinMode(led1, OUTPUT);  
        pinMode(led2, OUTPUT);  
        pinMode(led3, OUTPUT);  
        digitalWrite(led1, LOW); //Matikan LED  
        digitalWrite(led2, LOW); //Matikan LED  
        digitalWrite(led3, LOW); //Matikan LED  
        delay(1000);  
       }  
       void loop() {  
        // put your main code here, to run repeatedly:  
        digitalWrite(led1, HIGH); //Nyalakan LED  
        digitalWrite(led2, HIGH); //Nyalakan LED  
        digitalWrite(led3, HIGH); //Nyalakan LED  
        data = analogRead(pinLDR);  
        Serial.print("Nilai : ");  
        Serial.println(data);  
        if (data < 150){  
         Serial.println("Air Bening");  
        }  
        if (data > 150 && data < 300){  
         Serial.println("Keruh");  
        }  
        if (data > 300){  
         Serial.println("Sangat Keruh");  
        }  
       }  
      
      Read more

      4 Tong Sampah Otomatis Berbasis Arduino

      Project Untuk Kelompok 5




      Komponen yang dibutuhkan :
      • Arduino (Versi apapun) >> 1 Buah.
      • Sensor Jarak (Ultrasonic) >> 1 Buah.
      • Servo >> 1 Buah.
      • Buzzer >> 1 Buah.
      • Kabel >> Seperlunya.

      Wiring :

      Source Code :

           /*  
            * Generated Code by Kang Kamal  
            * kangkamal.blogspot.com  
            */  
           #include <NewPing.h>  
           #include <Servo.h>  
           #define TRIGGER_PIN 12 // Arduino pin tied to trigger pin on the ultrasonic sensor.  
           #define ECHO_PIN   11 // Arduino pin tied to echo pin on the ultrasonic sensor.  
           #define MAX_DISTANCE 200 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm.  
           NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance.  
           Servo myservo;  
           int buzzer = 6;  
           int jarak = 0;  
           void setup() {  
            // put your setup code here, to run once:  
            Serial.begin(9600);  
            pinMode(buzzer, OUTPUT);  
            digitalWrite(buzzer, LOW); //Set default buzzer >> OFF  
            myservo.attach(10); //Pin Servo  
            myservo.write(0); //Derajat servo di set ke 0  
           }  
           void loop() {  
            // put your main code here, to run repeatedly:  
            delay(20); //Diberikan jeda untuk membaca data dari sensor ultrasonic  
            jarak = sonar.ping_cm();  
            Serial.print("Jarak : ");  
            Serial.println(jarak);  
            if(jarak < 20){  
             digitalWrite(buzzer, HIGH); //Buzzer dinyalakan tanda ada objek mendekat  
             myservo.write(90); //Derajat servo di set ke 90  
             delay(2000);  
             myservo.write(0); //Derajat servo di set ke 0  
             digitalWrite(buzzer, LOW); //Buzzer dimatikan  
            }  
           }  
          
          Read more

          0 Safety Sensor Berbasis Arduino

          Project Untuk Kelompok 4




          Komponen yang dibutuhkan :
          • Arduino (Versi apapun) >> 1 Buah.
          • RFID Reader/Writer RC-522 >> 1 Buah.
          • Servo >> 1 Buah.
          • Buzzer >> 1 Buah.
          • Kabel >> Secukupnya.

          Wiring :

          Source Code :
          Untuk source code nanti langsung praktek di tempat

          Read more

          0 Pengatur Suhu Ruangan Otomatis Berbasis Arduino

          Project Untuk Kelompok 3



          Komponen yang dibutuhkan :
          • Arduino (Versi apapun) >> 1 Buah.
          • Fan (Kipas) seperti pada gambar diatas >> 1 Buah.
          • DHT-11 Sensor Temperature & Humadity >> 1 Buah.
          • Kabel >> Seperlunya.

          Wiring :

          Source Code :
             /*  
              * Generated Code by Kang Kamal  
              * kangkamal.blogspot.com  
              */  
             #include "DHT.h"  
             #define DHTPIN 2    // what pin we're connected to  
             #define DHTTYPE DHT11  // DHT 11  
             int fanPin = 13;  
             float suhu = 0;  
             DHT dht(DHTPIN, DHTTYPE);  
             void setup() {  
              // put your setup code here, to run once:  
              Serial.begin(9600);  
              Serial.println("DHT11 test!");  
              pinMode(fanPin, OUTPUT);  
              digitalWrite(fanPin, LOW); //Set default kipas mati saat program startup  
             }  
             void loop() {  
              // put your main code here, to run repeatedly:  
              suhu = dht.readTemperature();  
              Serial.print("Suhu Ruangan : ");  
              Serial.println(suhu);  
              if (suhu > 30){  
               digitalWrite(fanPin, HIGH); //Kipas nyala saat suhu diatas 30  
              }  
              else{  
               digitalWrite(fanPin, LOW); //Kipas mati saat suhu dibawah 30  
              }  
             }  
            
            Read more

            0 Lampu Belajar Otomatis Berbasis Arduino

            Project Untuk Kelompok 2


            Komponen yang dibutuhkan :
            • Arduino (Versi apapun) >> 1 Buah.
            • Sensor Jarak (Ultrasonic) >> 2 Buah.
            • Lampu >> 1 Buah.
            • Kabel >> Seperlunya.

            Wiring :

            Source Code :
               /*  
                * Generated Code by Kang Kamal  
                * kangkamal.blogspot.com  
                */  
               #include <NewPing.h>  
               #define TRIGGER_PIN1 12 // Arduino pin tied to trigger pin on the ultrasonic sensor.  
               #define ECHO_PIN1   11 // Arduino pin tied to echo pin on the ultrasonic sensor.  
               #define MAX_DISTANCE1 200 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm.  
               #define TRIGGER_PIN2 4 // Arduino pin tied to trigger pin on the ultrasonic sensor.  
               #define ECHO_PIN2   3 // Arduino pin tied to echo pin on the ultrasonic sensor.  
               #define MAX_DISTANCE2 200 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm.  
               NewPing sonar1(TRIGGER_PIN1, ECHO_PIN1, MAX_DISTANCE1); // NewPing setup of pins and maximum distance.  
               NewPing sonar2(TRIGGER_PIN2, ECHO_PIN2, MAX_DISTANCE2); // NewPing setup of pins and maximum distance.  
               int nilai1 = 0;  
               int nilai2 = 0;  
               void setup() {  
                // put your setup code here, to run once:  
                Serial.begin(9600);  
               }  
               void loop() {  
                // put your main code here, to run repeatedly:  
                delay(20); //Kasih jeda 20ms untuk memberikan sensor bekerja dengan akurat  
                nilai1 = sonar1.ping_cm();  
                nilai2 = sonar2.ping_cm();  
                Serial.print("Jarak1 : ");  
                Serial.print(nilai1);  
                Serial.print(", Jarak1 : ");  
                Serial.println(nilai2);  
                if (nilai1 < 10 && nilai2 < 10){ //Jika sensor 1 dan 2 tertutupi oleh buku  
                 //Isi program disini  
                }   
               }  
              
              Read more

              0 Jemuran Anti Hujan Berbasis Arduino

              Project Untuk Kelompok 1




              Komponen yang dibutuhkan :
              • Arduino (Versi apapun) >> 1 Buah.
              • Motor DC (Motor Tamiya) >> 1 Buah.
              • LDR >> 1 Buah.
              • Resistor 1K >> 1 Buah.
              • Button >> 2 Buah.
              • Kabel >> Seperlunya.
              • Tali >> Seperlunya.

              Wiring :


                Source Code:
                 /*  
                  * Generated Code by Kang Kamal  
                  * kangkamal.blogspot.com  
                  */  
                 int data = 0;  
                 int pinLDR  = A0;  
                 int pinMotor1 = 5;  
                 int pinMotor2 = 6;  
                 int tombol1  = 7;  
                 int tombol2  = 8;  
                 void setup() {  
                  // put your setup code here, to run once:  
                  Serial.begin(9600);  
                  pinMode(pinMotor1, OUTPUT);  
                  pinMode(pinMotor2, OUTPUT);  
                  pinMode(tombol1, INPUT_PULLUP);  
                  pinMode(tombol2, INPUT_PULLUP);  
                 }  
                 void loop() {  
                  // put your main code here, to run repeatedly:  
                  data = analogRead(pinLDR); //Masukkan nilai LDR ke variabel "data"  
                  Serial.print("Nilai LDR : ");  
                  Serial.println(data);  
                  if (data > 200){ //Jika tidak mendeteksi matahari (mendung);  
                   mundur();  
                   if(digitalRead(tombol1 == LOW)){ //Jika tombol tertekan >> STOP  
                    stop();  
                   }  
                  }  
                  else{ //Jika kembali panas  
                   maju();  
                   if(digitalRead(tombol2 == LOW)){ //Jika tombol tertekan >> STOP  
                    stop();  
                   }  
                  }  
                 }  
                 void maju(){  
                  digitalWrite(pinMotor1, HIGH);  
                  digitalWrite(pinMotor2, LOW);  
                 }  
                 void mundur(){  
                  digitalWrite(pinMotor1, LOW);  
                  digitalWrite(pinMotor2, HIGH);  
                 }  
                 void stop(){  
                  digitalWrite(pinMotor1, LOW);  
                  digitalWrite(pinMotor2, LOW);  
                 }  
                
                Read more

                CNC Tutorial Cetak si SAM Assistant

                 
                © All 4 You... | Design by Blog template in collaboration with Concert Tickets, and Menopause symptoms
                Powered by Blogger