Giter Club home page Giter Club logo

esp8266_rfid_oled's Introduction

ESP8266_RFID_OLED.ino

12/12/2016 Mike Lance

No license. Open to the public domain. Please respect liceses of sources.

Simple code for reading a Sunfounder RFID-RC522 card on a NodeMCU board displaying to a 128x64 I2C OLED. This was written for d.Tech/OEF intersession December 2016.

Libraries used: miguelbalboa/rfid adafruit/Adafruit_SSD1306

Note, you will need to adjust the Adafruit_SSD1306.h file in the library for the 128x64 display the first time.

The code reads the card UID and TYPE (copied from Miguel's examples) and displays it on the OLED. It waits a specified period (5 seconds by default) between card reads. It also logs actions to serial for debugging purposes.

/*
 * Wiring table
 * Sunfounder SPI RFID-RC522 board
 * Signal      GPIO         NodeMCU       MFRC522 board
 * ------------------------------------------------------------
 * Reset        2             D4             RST
 * SPI SS       15            D8             NSS
 * SPI MOSI     13*           D7             MOSI
 * SPI MISO     12*           D6             MISO
 * SPI SCK      14*           D5             SCK
 * ----         NC            NC             IRQ (not used here)
 *
 * I2C SSD1306 OLED board  -- This is HARD defined in Adafruit's libraries.
 * Signal      GPIO         NodeMCU        OLED board
 * ------------------------------------------------------------
 * I2C SCL      5*            D1             SCL
 * I2C SDA      4*            D2             SDA
 * 
 * Note the * indicates that these pins are fixed in this particular usage.
 * For SPI, it's fixed in the ESP library.  for I2C, the Adafruit library does
 * not give a method to redefine it (although other OLED libraries do).
 */

esp8266_rfid_oled's People

Contributors

iotmike avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.