ESP8266, NodeMcu RFID Kirim Data ke Database, XAMPP

By | September 9, 2018

Hello sahabat Anak Kendali.   pada kesempatan kali ini saya akan menuliskan artikel tentang Tutorial ESP8266, NodeMcu RFID Kirim Data ke Database, XAMPP.
dimana saya akan mengirimkan ID Card RFID ke Database Local. yang kemudian bisa dikembangkan untuk membuat project E-money ESP8266, seperti alat pembayaran Game Timezone dan game lainya yang biasa ditemukan di Mall.

sebelumnya saya sudah banyak menuliskan tutorial yang berkaitan, dan untuk kamu yang belum bisa membuat database dengan XAMPP, silahkan baca baca terlebih dahulu Artikel tentang Database MySQL 
dan untuk yang menggunakan modul Arduino Uno ESP8266 ESP-01 kirim data ke DATABASE. silahkan Baca Artikelnya Arduino Uno ESP8266 ESP-01 kirim data ke Database dan sebenarnya masih banyak lagi artikel terkait, untuk itu saya sarakan supaya membuka bagian daftar isi, dan cari judul artikel yang agan minati.

Menulis Database ESP8266 | Menulis ID CARD RFID Database Local MySQL XAMPP

baiklah pertama kita harus terlebih dahulu untuk menyiapkan alat dan rangkaianya, alat yang dibutuhkan adalah

Modul RFID
ESP8266 Nodemcu / Wemos D1 mini / Modul ESP8266 lainya
kemudian silahkan terlebih dahulu pahami tentang Komunikasi SPI, dan cari tau tentang pin SPI pada modul ESP8266
namun saya akan langsung tunjukan rangkaian untuk Nodemcu dan RFID nya
D1 NodemCu——- RST RFID
D2 NodemCu——- SDA/SS RFID
D5 NodemCu——- SCK RFID
D6 NodemCu——- MISO RFID
D7 NodemCu——- MOSI RFID
3V NodemCu——- 3.3V RFID
GND NodemCu—- GND RFID

ESP8266, NodeMcu RFID Kirim Data ke Database, XAMPP

selanjutnya sekarang buat terlebih dahulu Databasenya

kemudian buat program PHP nya untuk menghubungkan ke database
berikan nama koneksi.php pada program berikut dan simpan pada directory (“C/xampp/htdocs/esp8266”) esp8266 adalah folder buatan sendiri

berikan nama index.php pada program berikut dan simpan di folder yang sama

selanjutnya membuat program ESP8266 untuk Nodemcu dengan Arduino IDE. pastikan semua library sudah terinstall, dan jika belum bisa download di github.

  mungkin cukup ini dulu, nanti akan saya lanjutkan tutorialnya, sehingga bisa membaca Data pada database juga, kemudian bisa di buat project E-Money. untuk videonya silahkan tonton di bawah ini.

Selanjutnya Baca :  ESP8266, NodeMcu RFID Membaca Database, XAMPP

(Visited 1,555 times, 5 visits today)

22 thoughts on “ESP8266, NodeMcu RFID Kirim Data ke Database, XAMPP

  1. Fajareko

    Admin mau nanya. Klo ditambahin lcd 16×2 dan buzzer dan servo untuk outputnya jadi bagaimana ya programnya? Misal idnya terdaftar outputnya aktif ke22nya gitu. Tolong dikasih tau min..

    Reply
  2. IwanHz

    Gan knp di serial monitor selalu muncul tulisan gagal konek setial tap rfid ?

    Reply
  3. Aunaa

    exit status 1
    stray ‘\223’ in program
    pas di verify keluar error seperti ini gan kenapa ya ?

    Reply
    1. admin Post author

      itu karakter “” atau – di periksa lagi,, ada yang ke rubah karena web nya

      Reply
    1. admin Post author

      itu di atas ada gambanya gan,, bisa ikutin disitu isi database nya

      Reply
      1. naufal diva

        Arduino: 1.8.6 (Windows 10), Board: “NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled, 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 9600”

        bismillah:17:1: error: stray ‘\342’ in program

        const char* host = “192.168.100.46�;

        ^

        bismillah:17:1: error: stray ‘\200’ in program

        bismillah:17:1: error: stray ‘\234’ in program

        bismillah:17:23: error: too many decimal points in number

        const char* host = “192.168.100.46�;

        ^

        bismillah:17:1: error: stray ‘\342’ in program

        const char* host = “192.168.100.46�;

        ^

        bismillah:17:1: error: stray ‘\200’ in program

        bismillah:17:1: error: stray ‘\235’ in program

        bismillah:22:1: error: stray ‘\342’ in program

        WiFi.begin(“JAELANI�,�djaelani″);

        ^

        bismillah:22:1: error: stray ‘\200’ in program

        bismillah:22:1: error: stray ‘\234’ in program

        bismillah:22:1: error: stray ‘\342’ in program

        bismillah:22:1: error: stray ‘\200’ in program

        bismillah:22:1: error: stray ‘\235’ in program

        bismillah:22:1: error: stray ‘\342’ in program

        bismillah:22:1: error: stray ‘\200’ in program

        bismillah:22:1: error: stray ‘\235’ in program

        bismillah:22:1: error: stray ‘\342’ in program

        bismillah:22:1: error: stray ‘\200’ in program

        bismillah:22:1: error: stray ‘\263’ in program

        bismillah:29:1: error: stray ‘\342’ in program

        Serial.println(“I am waiting for card…�);

        ^

        bismillah:29:1: error: stray ‘\200’ in program

        bismillah:29:1: error: stray ‘\234’ in program

        bismillah:29:1: error: stray ‘\342’ in program

        bismillah:29:1: error: stray ‘\200’ in program

        bismillah:29:1: error: stray ‘\246’ in program

        bismillah:29:1: error: stray ‘\342’ in program

        bismillah:29:1: error: stray ‘\200’ in program

        bismillah:29:1: error: stray ‘\235’ in program

        bismillah:43:1: error: stray ‘\342’ in program

        Serial.println(F(“Your tag is not of type MIFARE Classic.�));

        ^

        bismillah:43:1: error: stray ‘\200’ in program

        bismillah:43:1: error: stray ‘\234’ in program

        bismillah:43:1: error: stray ‘\342’ in program

        bismillah:43:1: error: stray ‘\200’ in program

        bismillah:43:1: error: stray ‘\235’ in program

        bismillah:47:1: error: stray ‘\342’ in program

        strID = “�;

        ^

        bismillah:47:1: error: stray ‘\200’ in program

        bismillah:47:1: error: stray ‘\234’ in program

        bismillah:47:1: error: stray ‘\342’ in program

        bismillah:47:1: error: stray ‘\200’ in program

        bismillah:47:1: error: stray ‘\235’ in program

        bismillah:50:1: error: stray ‘\342’ in program

        (rfid.uid.uidByte[i] 5000) {

        ^

        bismillah:79:1: error: stray ‘\200’ in program

        bismillah:79:1: error: stray ‘\223’ in program

        bismillah:80:1: error: stray ‘\342’ in program

        Serial.println(“>>> Client Timeout !�);

        ^

        bismillah:80:1: error: stray ‘\200’ in program

        bismillah:80:1: error: stray ‘\234’ in program

        bismillah:80:1: error: stray ‘\342’ in program

        bismillah:80:1: error: stray ‘\200’ in program

        bismillah:80:1: error: stray ‘\235’ in program

        C:\Users\nopal\Desktop\bismillah\bismillah.ino: In function ‘void setup()’:

        bismillah:22:15: error: ‘JAELANI’ was not declared in this scope

        WiFi.begin(“JAELANI�,�djaelani″);

        ^

        bismillah:22:29: error: ‘djaelani’ was not declared in this scope

        WiFi.begin(“JAELANI�,�djaelani″);

        ^

        bismillah:29:19: error: ‘I’ was not declared in this scope

        Serial.println(“I am waiting for card…�);

        ^

        In file included from C:\Users\nopal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\cores\esp8266/Arduino.h:261:0,

        from sketch\bismillah.ino.cpp:1:

        C:\Users\nopal\Desktop\bismillah\bismillah.ino: In function ‘void loop()’:

        bismillah:43:21: error: ‘Your’ was not declared in this scope

        Serial.println(F(“Your tag is not of type MIFARE Classic.�));

        ^

        C:\Users\nopal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\cores\esp8266/WString.h:38:76: note: in definition of macro ‘FPSTR’

        #define FPSTR(pstr_pointer) (reinterpret_cast(pstr_pointer))

        ^

        C:\Users\nopal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\cores\esp8266/WString.h:39:34: note: in expansion of macro ‘PSTR’

        #define F(string_literal) (FPSTR(PSTR(string_literal)))

        ^

        C:\Users\nopal\Desktop\bismillah\bismillah.ino:43:16: note: in expansion of macro ‘F’

        Serial.println(F(“Your tag is not of type MIFARE Classic.�));

        ^

        bismillah:43:26: error: expected ‘)’ before ‘tag’

        Serial.println(F(“Your tag is not of type MIFARE Classic.�));

        ^

        C:\Users\nopal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\cores\esp8266/WString.h:38:76: note: in definition of macro ‘FPSTR’

        #define FPSTR(pstr_pointer) (reinterpret_cast(pstr_pointer))

        ^

        C:\Users\nopal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\cores\esp8266/WString.h:39:34: note: in expansion of macro ‘PSTR’

        #define F(string_literal) (FPSTR(PSTR(string_literal)))

        ^

        C:\Users\nopal\Desktop\bismillah\bismillah.ino:43:16: note: in expansion of macro ‘F’

        Serial.println(F(“Your tag is not of type MIFARE Classic.�));

        ^

        bismillah:47:15: error: expected primary-expression before ‘;’ token

        strID = “�;

        ^

        bismillah:50:47: error: expected primary-expression before ‘)’ token

        (rfid.uid.uidByte[i] 5000) {

        ^

        bismillah:80:19: error: expected primary-expression before ‘>>’ token

        Serial.println(“>>> Client Timeout !�);

        ^

        bismillah:80:21: error: expected primary-expression before ‘>’ token

        Serial.println(“>>> Client Timeout !�);

        ^

        bismillah:80:30: error: expected primary-expression before ‘Timeout’

        Serial.println(“>>> Client Timeout !�);

        ^

        exit status 1
        stray ‘\342’ in program

        bismillah:17:1: error: stray ‘\342’ in program

        const char* host = “192.168.100.46�;

        ^

        bismillah:17:1: error: stray ‘\200’ in program

        bismillah:17:1: error: stray ‘\234’ in program

        bismillah:17:23: error: too many decimal points in number

        const char* host = “192.168.100.46�;

        ^

        bismillah:17:1: error: stray ‘\342’ in program

        const char* host = “192.168.100.46�;

        ^

        bismillah:17:1: error: stray ‘\200’ in program

        bismillah:17:1: error: stray ‘\235’ in program

        bismillah:22:1: error: stray ‘\342’ in program

        WiFi.begin(“JAELANI�,�djaelani″);

        ^

        bismillah:22:1: error: stray ‘\200’ in program

        bismillah:22:1: error: stray ‘\234’ in program

        bismillah:22:1: error: stray ‘\342’ in program

        bismillah:22:1: error: stray ‘\200’ in program

        bismillah:22:1: error: stray ‘\235’ in program

        bismillah:22:1: error: stray ‘\342’ in program

        bismillah:22:1: error: stray ‘\200’ in program

        bismillah:22:1: error: stray ‘\235’ in program

        bismillah:22:1: error: stray ‘\342’ in program

        bismillah:22:1: error: stray ‘\200’ in program

        bismillah:22:1: error: stray ‘\263’ in program

        bismillah:29:1: error: stray ‘\342’ in program

        Serial.println(“I am waiting for card…�);

        ^

        bismillah:29:1: error: stray ‘\200’ in program

        bismillah:29:1: error: stray ‘\234’ in program

        bismillah:29:1: error: stray ‘\342’ in program

        bismillah:29:1: error: stray ‘\200’ in program

        bismillah:29:1: error: stray ‘\246’ in program

        bismillah:29:1: error: stray ‘\342’ in program

        bismillah:29:1: error: stray ‘\200’ in program

        bismillah:29:1: error: stray ‘\235’ in program

        bismillah:43:1: error: stray ‘\342’ in program

        Serial.println(F(“Your tag is not of type MIFARE Classic.�));

        ^

        bismillah:43:1: error: stray ‘\200’ in program

        bismillah:43:1: error: stray ‘\234’ in program

        bismillah:43:1: error: stray ‘\342’ in program

        bismillah:43:1: error: stray ‘\200’ in program

        bismillah:43:1: error: stray ‘\235’ in program

        bismillah:47:1: error: stray ‘\342’ in program

        strID = “�;

        ^

        bismillah:47:1: error: stray ‘\200’ in program

        bismillah:47:1: error: stray ‘\234’ in program

        bismillah:47:1: error: stray ‘\342’ in program

        bismillah:47:1: error: stray ‘\200’ in program

        bismillah:47:1: error: stray ‘\235’ in program

        bismillah:50:1: error: stray ‘\342’ in program

        (rfid.uid.uidByte[i] 5000) {

        ^

        bismillah:79:1: error: stray ‘\200’ in program

        bismillah:79:1: error: stray ‘\223’ in program

        bismillah:80:1: error: stray ‘\342’ in program

        Serial.println(“>>> Client Timeout !�);

        ^

        bismillah:80:1: error: stray ‘\200’ in program

        bismillah:80:1: error: stray ‘\234’ in program

        bismillah:80:1: error: stray ‘\342’ in program

        bismillah:80:1: error: stray ‘\200’ in program

        bismillah:80:1: error: stray ‘\235’ in program

        C:\Users\nopal\Desktop\bismillah\bismillah.ino: In function ‘void setup()’:

        bismillah:22:15: error: ‘JAELANI’ was not declared in this scope

        WiFi.begin(“JAELANI�,�djaelani″);

        ^

        bismillah:22:29: error: ‘djaelani’ was not declared in this scope

        WiFi.begin(“JAELANI�,�djaelani″);

        ^

        bismillah:29:19: error: ‘I’ was not declared in this scope

        Serial.println(“I am waiting for card…�);

        ^

        In file included from C:\Users\nopal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\cores\esp8266/Arduino.h:261:0,

        from sketch\bismillah.ino.cpp:1:

        C:\Users\nopal\Desktop\bismillah\bismillah.ino: In function ‘void loop()’:

        bismillah:43:21: error: ‘Your’ was not declared in this scope

        Serial.println(F(“Your tag is not of type MIFARE Classic.�));

        ^

        C:\Users\nopal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\cores\esp8266/WString.h:38:76: note: in definition of macro ‘FPSTR’

        #define FPSTR(pstr_pointer) (reinterpret_cast(pstr_pointer))

        ^

        C:\Users\nopal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\cores\esp8266/WString.h:39:34: note: in expansion of macro ‘PSTR’

        #define F(string_literal) (FPSTR(PSTR(string_literal)))

        ^

        C:\Users\nopal\Desktop\bismillah\bismillah.ino:43:16: note: in expansion of macro ‘F’

        Serial.println(F(“Your tag is not of type MIFARE Classic.�));

        ^

        bismillah:43:26: error: expected ‘)’ before ‘tag’

        Serial.println(F(“Your tag is not of type MIFARE Classic.�));

        ^

        C:\Users\nopal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\cores\esp8266/WString.h:38:76: note: in definition of macro ‘FPSTR’

        #define FPSTR(pstr_pointer) (reinterpret_cast(pstr_pointer))

        ^

        C:\Users\nopal\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\cores\esp8266/WString.h:39:34: note: in expansion of macro ‘PSTR’

        #define F(string_literal) (FPSTR(PSTR(string_literal)))

        ^

        C:\Users\nopal\Desktop\bismillah\bismillah.ino:43:16: note: in expansion of macro ‘F’

        Serial.println(F(“Your tag is not of type MIFARE Classic.�));

        ^

        bismillah:47:15: error: expected primary-expression before ‘;’ token

        strID = “�;

        ^

        bismillah:50:47: error: expected primary-expression before ‘)’ token

        (rfid.uid.uidByte[i] 5000) {

        ^

        bismillah:80:19: error: expected primary-expression before ‘>>’ token

        Serial.println(“>>> Client Timeout !�);

        ^

        bismillah:80:21: error: expected primary-expression before ‘>’ token

        Serial.println(“>>> Client Timeout !�);

        ^

        bismillah:80:30: error: expected primary-expression before ‘Timeout’

        Serial.println(“>>> Client Timeout !�);

        ^

        exit status 1
        stray ‘\342’ in program

        This report would have more information with
        “Show verbose output during compilation”
        option enabled in File -> Preferences.

        Reply
  4. Fadhli Hiday

    gan, dari coding diatas, jika menggunakan arduino mega dan esp8266, program bagian mana yang harus diganti ? terimakasih

    Reply
  5. naufal diva

    sketch_may23a:73:1: error: stray ‘\226’ in program

    if (millis() – timeout > 500) {

    error itu kenapa gan? setelah di verivy
    makasih gan

    Reply
    1. admin Post author

      ada beberapa karakter seperti ” atau – kerubah sama html websitenya, coba di replace

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *