Anda di halaman 1dari 13

More

Create Blog
Sign In

Home KIT TRAINING DAFTAR BUKU JUAL ROBOT JASA DESIGN GRAFIS JASA EDIT VIDEO JASA GAME

Translate BANTU SUBSCRIBE YA

Select Language ​▼

Membuat Alat Prabayar Pulsa Air Otomatis Menggunakan


Arduino Keypad Matrix 4x4 dan RFID RC522 dengan
Interface VB 6.0 dan dataase Ms. Access
Membuat Alat Prabayar Pulsa Air Otomatis Menggunakan Arduino Keypad Matrix 4x4 dan RFID
SEARCH ARTICLE IN THIS BLOG
RC522 dengan Interface VB 6.0 dan dataase Ms. Access

Search

Total Pageviews

1,561,732

          Pada kesempatan kali ini saya akan menjelaskan mengenai bagaimana cara membuat
sebuah alat yang berfungsi untuk topup pulsa air otomatis berbasis RFID jadi seperti halnya
pulsa sms atau kuota internet yang harus di topup untuk penggunaannya, alat ini juga seperti itu
namun aplikasinya untuk air, jadi kita membeli berapa liter air dan akan disimpan untuk ID kartu
tersebut, setelah itu jika ingin membeli air hanya perlu dekatkan kartu kealat kemudian akan
dikurangi oleh nilai pembelian sehingga akan tampak saldo yang tersisa. untuk lebih jelasnya
berikut adalah skema dan programnya.

a. Arduino Uno
b. RFID RC-522

c. Keypad Matrik 4x4

Mau Pesan Alat atau Program ? Hubungi

Jasa Coding, Desain dan Cetak PCB

d. LCD 16x2 + I2C

Jasa Pembuatan Alat

e. Program Arduino IDE

#include <SPI.h>

#include <Keypad.h>

#include <MFRC522.h>

#include <LiquidCrystal_I2C.h>  //i2C LCD Library


LiquidCrystal_I2C lcd(0x3F, 16, 2); //library i2c lcd

#define SS_PIN 10

#define RST_PIN 9

MFRC522 mfrc522(SS_PIN, RST_PIN);   // Create MFRC522 instance.

int buzzer = 8;

char customKey;

const byte ROWS = 4;

const byte COLS = 4;

long passwd = 0;

long isiku;

long kartu1;

long kartu2;

long kartu3;

long kartu4;

int id;

long beli;

char keys[ROWS][COLS] = {

{'1', '2', '3', 'A'},

{'4', '5', '6', 'B'},

{'7', '8', '9', 'C'},

{'*', '0', '#', 'D'}

};

byte rowPins[ROWS] = {2,3,4,5}; //connect to the row pinouts of the keypad

byte colPins[COLS] = {6,7,A0,A1}; //connect to the column pinouts of the keypad

//initialize an instance of class NewKeypad

Keypad customKeypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS);

void setup()

  pinMode(buzzer,OUTPUT);

  digitalWrite(buzzer,LOW);

  lcd.begin(); //set lcd i2c

  lcd.noCursor(); //biar gak ada cursor di lcd

  lcd.clear(); //clear lcd

  Serial.begin(9600);   // Initiate a serial communication

  SPI.begin();      // Initiate  SPI bus

  mfrc522.PCD_Init();   // Initiate MFRC522

//  Serial.println("Put your card to the reader...");

//  Serial.println();

  delay(1000);

void loop()

HALO ENGINEER
  lcd.setCursor(0,0);

  lcd.print("Pilih Menu");
  lcd.setCursor(0,1);

  lcd.print("A.Isi    B.Bayar");

customKey = customKeypad.getKey();

    if(customKey == 'B'){

    lcd.clear();

    lcd.setCursor(0,0);

    lcd.print("Dekatkan Kartu");

    delay(3000);

    lcd.clear();

    isiscan();

    lcd.clear();

    beli = 0;

    bayar();

    }

    if(customKey == 'C'){

    lcd.clear();
Jasa Koding
    lcd.setCursor(0,0);

    lcd.print("Dekatkan Kartu");

    delay(3000);

    lcd.clear(); 

    cek();

    }

   

    if(customKey == 'A'){

    lcd.clear();

    delay(1000);

    passwd = 0;

    isi();

      lcd.setCursor(0,0);

      lcd.print("Dekatkan Kartu");

    delay(3000);

    lcd.clear();

    isiscan();

    delay(1000);

    isiku = 0;

mo c .
    scan();

mo c . o v i v
    } 

   

Get
}

void cek(){

your
 

  SPI.begin();      // Initiate  SPI bus

  mfrc522.PCD_Init();   // Initiate MFRC522

//  Serial.println("Put your card to the reader...");

  // Look for new cards

  if ( ! mfrc522.PICC_IsNewCardPresent())

  {

vivo Y21
promo
    //return;

  }

  // Select one of the cards

  if ( ! mfrc522.PICC_ReadCardSerial())

now
  {

    //return;

  }

  //Show UID on serial monitor

  //lcd.setCursor(0,0);

//  Serial.print("UID tag :");

  String content= "";


vivo.com
  byte letter;

  for (byte i = 0; i < mfrc522.uid.size; i++)

  {

 //    Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " ");

 //    Serial.print(mfrc522.uid.uidByte[i], HEX);

Open
     content.concat(String(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " "));

     content.concat(String(mfrc522.uid.uidByte[i], HEX));

  }

KONSULTASI
//  Serial.println();

//  Serial.print("Message : ");

  content.toUpperCase();

  if (content.substring(1) == "C5 9C F1 29")

  {

     digitalWrite(buzzer,HIGH);

     delay(200);

     digitalWrite(buzzer,LOW);

    

      lcd.setCursor(0,0);

      lcd.print("ID=");

      lcd.print(content.substring(1));

      lcd.setCursor(0,1);

      lcd.print("Saldo=");

      lcd.print(kartu1);

      lcd.print("       ");

      delay(3000);

Jasa Pembuatan Robot


      lcd.clear();

      return;

  }

 if (content.substring(1) == "94 C6 77 89")

  {

     digitalWrite(buzzer,HIGH);

     delay(200);

     digitalWrite(buzzer,LOW);

      lcd.setCursor(0,0);

      lcd.print("ID=");

      lcd.print(content.substring(1));

      lcd.setCursor(0,1);

      lcd.print("Saldo=");

      lcd.print(kartu2);

      lcd.print("       ");

      delay(3000);

      lcd.clear();

      return;

  }

   if (content.substring(1) == "A3 32 48 83")


Jasa Koding
  {

     digitalWrite(buzzer,HIGH);

     delay(200);

     digitalWrite(buzzer,LOW);

      lcd.setCursor(0,0);

      lcd.print("ID=");

      lcd.print(content.substring(1));

      lcd.setCursor(0,1);

      lcd.print("Saldo=");

      lcd.print(kartu3);

      lcd.print("       ");

      delay(3000);

      lcd.clear();

      return;

  }

   if (content.substring(1) == "F7 3E B8 73")

  {

     digitalWrite(buzzer,HIGH);

     delay(200);

     digitalWrite(buzzer,LOW);

      lcd.setCursor(0,0);

      lcd.print("ID=");

      lcd.print(content.substring(1));

      lcd.setCursor(0,1);

      lcd.print("Saldo=");

      lcd.print(kartu4);

      lcd.print("       ");

      delay(3000);

      lcd.clear();

      return;

  }

  cek(); 

  }

void isi(){

  lcd.setCursor(0,0);

  lcd.print("Input Password");

customKey = customKeypad.getKey();

    if(customKey >= '0' && customKey <= '9')

    {

      passwd = passwd * 10 + (customKey - '0');

      lcd.setCursor(0,1);

      lcd.print(passwd);
Kursus Arduino ONLINE

    }

  
    if((customKey == 'D')&&(passwd == 112233)){

    lcd.clear();

    delay(1000);

    customKey == ' ';

    return;

    }

    if(customKey == 'C'){

    lcd.clear();

    delay(200);

    passwd = 0;

    }

  
 isi();

  }

void isiscan(){

  lcd.setCursor(0,0);
KURSUS ROBOTIK ARDUINO

  lcd.print("Scan Kartu");

  SPI.begin();      // Initiate  SPI bus

  mfrc522.PCD_Init();   // Initiate MFRC522

//  Serial.println("Put your card to the reader...");

  // Look for new cards

  if ( ! mfrc522.PICC_IsNewCardPresent())

  {

    //return;

  }

  // Select one of the cards

  if ( ! mfrc522.PICC_ReadCardSerial())

Kursus Arduino
  {

    //return;

  }

  //Show UID on serial monitor

  //lcd.setCursor(0,0);

//  Serial.print("UID tag :");

  String content= "";

  byte letter;

  for (byte i = 0; i < mfrc522.uid.size; i++)

  {

 //    Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " ");

 //    Serial.print(mfrc522.uid.uidByte[i], HEX);

     content.concat(String(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " "));

     content.concat(String(mfrc522.uid.uidByte[i], HEX));

  }

//  Serial.println();

//  Serial.print("Message : ");

  content.toUpperCase();

  if (content.substring(1) == "C5 9C F1 29")

  {

     digitalWrite(buzzer,HIGH);

     delay(200);

     digitalWrite(buzzer,LOW);

      lcd.setCursor(0,1);

      lcd.print(content.substring(1));

      delay(3000);

      id = 1;

      lcd.clear();

      content.substring(1) = "";

      return;

  }

 if (content.substring(1) == "94 C6 77 89")

  {

     digitalWrite(buzzer,HIGH);

     delay(200);

     digitalWrite(buzzer,LOW);

      lcd.setCursor(0,1);

      lcd.print(content.substring(1));

      delay(3000);

      id = 2;

      lcd.clear();

      content.substring(1) = "";

      return;

  }

   if (content.substring(1) == "A3 32 48 83")

  {

     digitalWrite(buzzer,HIGH);

     delay(200);

     digitalWrite(buzzer,LOW);

      lcd.setCursor(0,1);

      lcd.print(content.substring(1));

      delay(3000);

      id = 3;

      lcd.clear();

      content.substring(1) = "";

      return;

  }

   if (content.substring(1) == "F7 3E B8 73")

  {

     digitalWrite(buzzer,HIGH);

     delay(200);

     digitalWrite(buzzer,LOW);

      lcd.setCursor(0,1);

      lcd.print(content.substring(1));

      delay(3000);

      id = 4;

      lcd.clear();

      content.substring(1) = "";

      return;

  }
Jasa Program Arduino

isiscan(); 

void scan(){

  lcd.setCursor(0,0);

  lcd.print("Isi Berapa lt?");

customKey = customKeypad.getKey();

    if(customKey >= '0' && customKey <= '9')

    {

      isiku = isiku * 10 + (customKey - '0');


DAFTAR ARTIKEL
      lcd.setCursor(0,1);

      lcd.print(isiku);
► 
2022
(33)
► 

    }
► 
2021
(36)
► 

   ► 
2020
(59)
► 

    if(customKey == 'C'){

▼ 
2019
(68)
▼ 

    lcd.clear();

► 
December
(5)
► 

    delay(200);

    isiku = 0;
► 
November
(5)
► 

    }
► 
October
(15)
► 

► 
September
(5)
► 

    if((customKey == 'D')&&(id == 1)){

    lcd.clear();
► 
August
(3)
► 

    delay(2000);
► 
July
(3)
► 

    kartu1 = isiku;


► 
June
(2)
► 

    return;

► 
May
(10)
► 

    }

► 
April
(13)
► 

    if((customKey == 'D')&&(id == 2)){


► 
March
(2)
► 

    lcd.clear();
► 
February
(1)
► 

    delay(2000);

▼ 
January
(4)
▼ 

    kartu2 = isiku;

Membuat Alat Monitoring Ketinggian Air


    return;

(Water Leve...
    }

Membuat Alat Prabayar Air Isi Ulang


    if((customKey == 'D')&&(id == 3)){
Otomatis Berba...
    lcd.clear();
Membuat Alat Prabayar Pulsa Air
    delay(2000);
Otomatis Menggunak...
    kartu3 = isiku;
Alat Kendali Pompa (Relay)
    return;
Menggunakan SMS berbasi...
    }

► 
2018
(50)
► 

    if((customKey == 'D')&&(id == 4)){


► 
2017
(102)
► 

    lcd.clear();

► 
2016
(129)
► 

    delay(2000);

► 
2015
(137)
► 

    kartu4 = isiku;

    return;
► 
2014
(91)
► 

    }

   

Kursus Robotik
  
 scan();

  }

void bayar(){

  lcd.setCursor(0,0);

  lcd.print("Beli Berapa lt?");

customKey = customKeypad.getKey();

    if(customKey >= '0' && customKey <= '9')

    {

      beli = beli * 10 + (customKey - '0');

      lcd.setCursor(0,1);
Buku Membuat Robot ARDUINO
      lcd.print(beli);

    }

  
    if(customKey == 'C'){

    lcd.clear();

    delay(200);

    beli = 0;

    }

    if((customKey == 'D')&&(id == 1)){

    lcd.clear();

    delay(2000);

    kartu1 = kartu1 - beli;

    if(kartu1 >= 0){

    Serial.println(id);

    Serial.println(beli);

    Serial.println(kartu1); 

    delay(1000);

    lcd.setCursor(0,0);
Kursus Mikrokontroller
    lcd.print("BERHASIL");
    lcd.setCursor(0,1);

    lcd.print("SALDO=");

    lcd.print(kartu1);

    delay(5000);

    lcd.clear();

    return;

    }

    if(kartu1 < 0){

    kartu1 = kartu1 + beli; 

    lcd.setCursor(0,0);

    lcd.print("SALDO KURANG");

    lcd.setCursor(0,1);

    lcd.print("SALDO=");

    lcd.print(kartu1);

    delay(5000);

    lcd.clear();

    beli = 0;

    }
Jual Buku Elektronika
    }

    if((customKey == 'D')&&(id == 2)){

    lcd.clear();

    delay(2000);

    kartu2 = kartu2 - beli;

    if(kartu2 >= 0){

    Serial.println(id);

    Serial.println(beli);

    Serial.println(kartu2); 

    delay(1000);

    lcd.setCursor(0,0);

    lcd.print("BERHASIL"); ingin pesan ? klik pada Gambar


    lcd.setCursor(0,1);

    lcd.print("SALDO=");

Jual Buku Panduan Mikrokontroler


    lcd.print(kartu2);

    delay(5000);

    lcd.clear();

    return;

    }

    if(kartu2 < 0){

    kartu2 = kartu2 + beli; 

    lcd.setCursor(0,0);

    lcd.print("SALDO KURANG");

    lcd.setCursor(0,1);

    lcd.print("SALDO=");

    lcd.print(kartu2);

    delay(5000);

    lcd.clear();

    beli = 0;
Mau beli ? klik pada Gambar
    }

Jual Buku Membuat Game 3D


    }

    if((customKey == 'D')&&(id == 3)){

    lcd.clear();

    delay(2000);

    kartu3 = kartu3 - beli;

    if(kartu3 >= 0){

    Serial.println(id);

    Serial.println(beli);

    Serial.println(kartu3);

    delay(1000);

    lcd.setCursor(0,0);

    lcd.print("BERHASIL");
    lcd.setCursor(0,1);

    lcd.print("SALDO=");
ingin pesan? klik pada Gambar
    lcd.print(kartu3);

    delay(5000);
NOVEL THE LOST STORY
    lcd.clear();

    return;

    }

    if(kartu3 < 0){

    kartu3 = kartu3 + beli; 

    lcd.setCursor(0,0);

    lcd.print("SALDO KURANG");

    lcd.setCursor(0,1);

    lcd.print("SALDO=");

    lcd.print(kartu3);

    delay(5000);

    lcd.clear();

    beli = 0;

    }

Mau beli ? klik Gambar


    }

ARTIKEL TERBARU
    if((customKey == 'D')&&(id == 4)){

    lcd.clear();
TENSIMETER,BPM,SPO2,SUHU
    delay(2000);
ARDUINO
    kartu4 = kartu4 - beli;

    if(kartu4 >= 0){

    Serial.println(id);

    Serial.println(beli);

    Serial.println(kartu4);

    delay(1000);

    lcd.setCursor(0,0);

    lcd.print("BERHASIL");
    lcd.setCursor(0,1);
ARTIKEL TERPOPULER
    lcd.print("SALDO=");

    lcd.print(kartu4);
ARDUINO Fuzzy Logic
    delay(5000);
Controller Mamdani untuk
Monitoring Asap / Gas dan
    lcd.clear();

Temperature (suhu)
    return;

    }

ARDUINO PID Control


    if(kartu4 < 0){
Tutorial Kendali Kecepatan
    kartu4 = kartu4 + beli; 
Motor DC (RPM) dilengkapi
    lcd.setCursor(0,0);
Keypad 4x4 dan LCD 16x2
    lcd.print("SALDO KURANG");

    lcd.setCursor(0,1);

ALAT KENDALI SUHU /


    lcd.print("SALDO=");

TEMPERATURE PANAS
    lcd.print(kartu4);
MENGGUNAKAN DIMMER
    delay(5000);
DAN PID CONTROL
    lcd.clear();

    beli = 0;

    }
Alat Monitoring Tegangan
Arus Daya Energy KWH
    }

Power Factor Frequency AC


   
(AC Voltage and current)
  bayar();
ARDUINO
 }
Mengakses Sensor tekanan
udara MPX 5700DP / MPX
5700AP dan Water Flow
Sensor ARDUINO
 

 f. Program Interface VB 6.0


Cara Menggunakan Arduino
IDE

Jasa Program ARDUINO


dan Mikrokontroller AVR
untuk UMUM

Membuat Alat Ukur dan


Monitor Kadar Gula Darah
Dalam Tubuh Secara NON
INVASIVE Menggunakan
Arduino

kursus elektronika,
- Module 1.bas mikrokontroler dan robotika
Public Conn As New ADODB.Connection

Public Rs As New ADODB.Recordset

Public SQl As String

Public i As Byte

Membuat Moving Teks dan


Moving Sign Menggunakan
Public Sub dbConnect()
DMD Panel Led P10
Set Conn = New ADODB.Connection
Arduino (Teks Berjalan)
Conn.ConnectionString = strConn

Conn.Open

End Sub

Public Function strConn() As String

Set Conn = New ADODB.Connection

Set Rs = New ADODB.Recordset

strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Users\yanuar\Desktop\interface\database\dbsuhu.mdb;Persist Security Info=False"

End Function
- Form 1.frm
Option Explicit

Dim arrdata()

Dim TotalBaca As Integer

Dim BMI As Single

Dim Keterangan As String

Const MAKSBACA = 15

Dim Conn1 As ADODB.Connection

Dim Cmd1 As ADODB.Command

Dim Param1 As ADODB.Parameter

Dim Rs1 As ADODB.Recordset

Private Sub berhenti_Click()

  start.Enabled = True

    berhenti.Enabled = False

    TimerBaca.Enabled = False

End Sub

Private Sub Command1_Click()

Dim SQl As String

   

   Call dbConnect

   

      SQl = "INSERT INTO tbsuhu VALUES('" & Text2(0).Text & "','" & Label4.Caption & "','" &
Label2.Caption & "','" & Text2(1).Text & "','" & Text2(2).Text & "')"

   

    Dim Rs As Recordset

    Set Rs = New ADODB.Recordset

    Rs.Open SQl, Conn, adOpenDynamic

End Sub

Private Sub Command2_Click()

Unload Me

End Sub

Private Sub Form_Load()

Dim i As Byte

For i = 1 To 16

    ComboCOM.AddItem (i)

Next i

End Sub

Private Sub MSComm2_OnComm()

Dim buffer As String

Dim temp As String

Dim pisah() As String

Dim i As Integer

If MSComm2.CommEvent = comEvReceive Then

    buffer = MSComm2.Input

    pisah = Split(buffer, Chr$(13))

On Error Resume Next

If buffer <> " " Then

With Text1

    .SelStart = Len(.Text)

    .SelText = buffer

End With

For i = 0 To 2

    If 0 < 3 Then

        Text2(i).Text = CStr(pisah(i))


        End If

        Next i

    Else

    buffer = " "

    End If

End If

End Sub

Private Sub start_Click()

Dim u As Integer

    On Error GoTo ada_eror


   

    MSComm2.CommPort = ComboCOM.Text

    MSComm2.Settings = "9600,N,8,1"

    MSComm2.RThreshold = 15

    MSComm2.InputLen = 15

    MSComm2.InputMode = comInputModeText

    MSComm2.PortOpen = True ' buka port

   

    ReDim arrdata(1 To MAKSBACA + 1)

    For u = 1 To MAKSBACA

        arrdata(u) = 0

    Next

    TotalBaca = 0

    start.Enabled = False

    berhenti.Enabled = True

    TimerBaca.Enabled = True

    Timer1.Enabled = True

    Timer2.Enabled = True

    Timer3.Enabled = True

ada_eror:

 If ComboCOM.ListIndex < 1 Then

      MsgBox "COM berada di Nomor : " & Err.Number & vbCrLf & Err.Description, vbCritical +
vbOKOnly, "ERROR"

    start.Enabled = True

    berhenti.Enabled = True

    ComboCOM.Text = "Pilih COM"

End If

End Sub

Private Sub Timer2_Timer()

Adodc1.Refresh

Dim ok As Integer

Dim mode As Integer

End Sub

Private Sub Timer3_Timer()

MSComm2_OnComm

End Sub

Private Sub Timer4_Timer()

 Label4.Caption = Format(Time, "hh:mm:ss")

 Label2.Caption = Format(Date, "dd:mm:yy")

End Sub

Private Sub TimerBaca_Timer()

Dim strInput As String

Dim strPotong As String

Dim singleInput As Single

Dim u As Integer

    strInput = MSComm2.Input

        strPotong = strInput

        If TotalBaca >= MAKSBACA Then

            TimerBaca.Enabled = False

            If MSComm2.PortOpen = True Then MSComm2.PortOpen = False

            Call berhenti_Click

        End If

End Sub

g. VIDEO HASILNYA
Posted by
project diy microcontroller

No comments:

Post a Comment
To leave a comment, click the button below to sign in with Google.

SIGN IN WITH GOOGLE

Pelanggan Baru Diskon 15%


Promo pelanggan baru 15% off. Pembayaran tempo 30 hari

untuk pelanggan baru korporat.

Newer Post Home Older Post

Subscribe to:
Post Comments (Atom)

Powered by Blogger.

Anda mungkin juga menyukai