• Login
    • Search
    • [[global:header.recent]]
    • [[global:header.tags]]
    • [[global:header.popular]]
    • [[global:header.groups]]
    • [[global:header.search]]
    1. Home
    2. MacManus
    M
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 10
    • Best 6
    • Controversial 0
    • Groups 0

    MacManus

    @MacManus

    7
    Reputation
    2139
    Profile views
    10
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    MacManus Unfollow Follow

    Best posts made by MacManus

    • Logging into Desktop with Arduino

      You want to Login to your Desktop with your NFC Ring?
      You have an Arduino Leonardo, an NFC Ring and an Elechouse PN532 reader (v3 recommended)?

      Great, lets build a Log-In Station for your Laptop.
      It works with nearly every password field (Debian Linux Login, Windows 8.1 Login, Keepass tested and worked - BIOS password doesn't work).

      Connect the Elechouse reader to the Arduino Leonardo (see below) and connect the Arduino via USB to your computer.

      PN532 Module <-> Arduino

      GND <-> GND
      VCC <-> 3v3
      SDA <-> SDA (on Arduino Leonardo D2)
      SCL <-> SCL (on Arduino Leonardo D3)

      So here's the code:

      #include <EEPROM.h>
      
      /**************************************************************************/
      /*!
      Autor: Pascal König
      Website: http://blog.koenig-pascal.de
      
      Elechouse NFC Module v2.0
      Library: https://github.com/elechouse/PN532
      NFC Code Template: https://github.com/JohnMcLear/NFC_Ring_Arduino_Door_Lock/blob/master/NFC_Door_Lock.ino
      
      */
      /**************************************************************************/
      
      
      #include <Wire.h>
      #include <PN532_I2C.h>
      #include <PN532.h>
      
      PN532_I2C pn532i2c(Wire);
      PN532 nfc(pn532i2c);
      
      
      void setup(void) {
        Keyboard.begin();
        Serial.begin(115200);
        Serial.println("Hello!");
      
        nfc.begin();
      
        uint32_t versiondata = nfc.getFirmwareVersion();
        if (! versiondata) {
          Serial.print(versiondata);
          Serial.print("Didn't find PN53x board");
          while (1); // halt
        }
        
        // Got ok data, print it out!
        Serial.print("Found chip PN5"); Serial.println((versiondata>>24) & 0xFF, HEX);
        Serial.print("Firmware ver. "); Serial.print((versiondata>>16) & 0xFF, DEC);
        Serial.print('.'); Serial.println((versiondata>>8) & 0xFF, DEC);
        
        // Set the max number of retry attempts to read from a card
        // This prevents us from waiting forever for a card, which is
        // the default behaviour of the PN532.
        nfc.setPassiveActivationRetries(0xFF);
        
        // configure board to read RFID tags
        nfc.SAMConfig();
          
        Serial.println("Waiting for an ISO14443A card");
      }
      
      void loop(void) {
        String ringUid;
        boolean success;
        uint8_t uid[] = { 0, 0, 0, 0, 0, 0, 0 }; // Buffer to store the returned UID
        uint8_t uidLength; // Length of the UID (4 or 7 bytes depending on ISO14443A card type)
        
        // Wait for an ISO14443A type cards (Mifare, etc.). When one is found
        // 'uid' will be populated with the UID, and uidLength will indicate
        // if the uid is 4 bytes (Mifare Classic) or 7 bytes (Mifare Ultralight)
        success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, &uid[0], &uidLength);
        
        if (success) {
          // Display some basic information about the card
          // Serial.println("Found an ISO14443A card");
          // Serial.print(" UID Length: "); Serial.print(uidLength, DEC); Serial.println(" bytes");
          Serial.print(" UID Value: ");
          for (uint8_t i = 0; i < uidLength; i++)
          {
            //Serial.print("..");
            //Serial.print(uid[i], HEX);
            ringUid += String(uid[i], HEX);
      
          }
          //Serial.println(ringUid + "\n");
          Serial.println(ringUid);
          if(ringUid == "publicRingUID"){
            Serial.println("public");
          }
          else if (ringUid == "privateRingUID"){
            Serial.println("private");
            Keyboard.println("password");
            delay(5000);
          }
        }
      }
      

      Change your password at the end of the code (in the private Ring Area).

      And here's a video

      If you have questions: Feel free to ask.

      posted in Ideas for using NFC Rings arduino
      M
      MacManus
    • Switch Light with your NFC Ring

      So here's a video of my prototype for a light switch with Arduino.
      Code, Tutorial and Images are following.
      https://mediacru.sh/uuF-Ulrhdwey

      posted in Ideas for using NFC Rings nfc ring arduino
      M
      MacManus
    • RE: Switch Light with your NFC Ring

      Hi @Lokki thanks - I already ordered an Elechouse V3 Reader, but till it arrives i build the prototype with my v2 reader.

      So here's an Image:
      Light Switch

      The parts list:

      • An Arduino
      • Elechouse PN532 reader (V3 recommended - see @Lokki comment
      • 433Mhz Transmitter (e.g. from eBay)
      • a working outlet device (see here)

      And the source code:

      #include <EEPROM.h>
      
      /**************************************************************************/
      /*!
      Autor: Pascal König
      Website: http://blog.koenig-pascal.de
      
      Elechouse NFC Module v2.0
      Library: https://github.com/elechouse/PN532
      NFC Code Template: https://github.com/JohnMcLear/NFC_Ring_Arduino_Door_Lock/blob/master/NFC_Door_Lock.ino
      
      RCSwitch Library: https://code.google.com/p/rc-switch/
      
      */
      /**************************************************************************/
      
      #include <RCSwitch.h>
      
      RCSwitch mySwitch = RCSwitch();
      
      
      #include <Wire.h>
      #include <PN532_I2C.h>
      #include <PN532.h>
      
      PN532_I2C pn532i2c(Wire);
      PN532 nfc(pn532i2c);
      
      
      void setup(void) {
        mySwitch.enableTransmit(10);
      
        Serial.begin(115200);
        Serial.println("Hello!");
      
        nfc.begin();
      
        uint32_t versiondata = nfc.getFirmwareVersion();
        if (! versiondata) {
          Serial.print(versiondata);
          Serial.print("Didn't find PN53x board");
          while (1); // halt
        }
        
        // Got ok data, print it out!
        Serial.print("Found chip PN5"); Serial.println((versiondata>>24) & 0xFF, HEX);
        Serial.print("Firmware ver. "); Serial.print((versiondata>>16) & 0xFF, DEC);
        Serial.print('.'); Serial.println((versiondata>>8) & 0xFF, DEC);
        
        // Set the max number of retry attempts to read from a card
        // This prevents us from waiting forever for a card, which is
        // the default behaviour of the PN532.
        nfc.setPassiveActivationRetries(0xFF);
        
        // configure board to read RFID tags
        nfc.SAMConfig();
          
        Serial.println("Waiting for an ISO14443A card");
      }
      
      void loop(void) {
        String ringUid;
        boolean success;
        uint8_t uid[] = { 0, 0, 0, 0, 0, 0, 0 }; // Buffer to store the returned UID
        uint8_t uidLength; // Length of the UID (4 or 7 bytes depending on ISO14443A card type)
        
        // Wait for an ISO14443A type cards (Mifare, etc.). When one is found
        // 'uid' will be populated with the UID, and uidLength will indicate
        // if the uid is 4 bytes (Mifare Classic) or 7 bytes (Mifare Ultralight)
        success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, &uid[0], &uidLength);
        
        if (success) {
          // Display some basic information about the card
          // Serial.println("Found an ISO14443A card");
          // Serial.print(" UID Length: "); Serial.print(uidLength, DEC); Serial.println(" bytes");
          Serial.print(" UID Value: ");
          for (uint8_t i = 0; i < uidLength; i++)
          {
            //Serial.print("..");
            //Serial.print(uid[i], HEX);
            ringUid += String(uid[i], HEX);
      
          }
          //Serial.println(ringUid + "\n");
          Serial.println(ringUid);
          if(ringUid == "YourFrontRingUID"){
            Serial.println("public");
            mySwitch.switchOn("11111", 1);
          }
          else if (ringUid == "YourBackRingUID"){
            Serial.println("private");
            mySwitch.switchOff("11111", 1);
          }
        }
      }
      

      The schematics, an arduino diagram and a little howto is following.

      posted in Ideas for using NFC Rings
      M
      MacManus
    • RE: Switch Light with your NFC Ring

      Now, here we go:

      Diagram

      Short Description:

      Connect the PN532 Module as follows:

      PN532 Module <-> Arduino

      GND <-> GND
      VCC <-> 3v3
      SDA <-> SDA (on Arduino Uno A4)
      SCL <-> SCL (on Arduino Uno A5)

      For TWI Pins of other Boards, see Arduino Boards Page

      Connect the 433Mhz Transmitter as follows:

      433Mhz Transmitter <-> Arduino

      DATA <-> Data Pin (i use Pin 10)
      VCC <-> 3v3
      GND <-> GND

      Do you have any questions? Feel free to ask!

      posted in Ideas for using NFC Rings
      M
      MacManus
    • RE: Logging into Desktop with Arduino

      @Lokki what are your error messages in the arduino ide?
      @Nairod785 here are some pictures:


      posted in Ideas for using NFC Rings
      M
      MacManus
    • RE: NFC Computer Login (w/ Leonardo), other possibilities?

      Hi, you can do everything you imagine.
      For example the Logout:
      See code for login (https://forum.nfcring.com/topic/392/logging-into-desktop-with-arduino/3).
      Replace the code "Keyboard.println("password");" at the end with the following code:

      Keyboard.press(KEY_LEFT_GUI);
      Keyboard.press('l');
      delay(100);
      Keyboard.releaseAll();

      This code presses the Window Key and the "L" key at the same time, so your windows computer will be locked.
      For more information, read the Arduino docs: http://arduino.cc/en/Reference/MouseKeyboard
      You can emulate the Keyboard and the Mouse with an Ardunio Leonardo

      posted in Ideas for using NFC Rings
      M
      MacManus

    Latest posts made by MacManus

    • RE: NFC Computer Login (w/ Leonardo), other possibilities?

      Hi, you can do everything you imagine.
      For example the Logout:
      See code for login (https://forum.nfcring.com/topic/392/logging-into-desktop-with-arduino/3).
      Replace the code "Keyboard.println("password");" at the end with the following code:

      Keyboard.press(KEY_LEFT_GUI);
      Keyboard.press('l');
      delay(100);
      Keyboard.releaseAll();

      This code presses the Window Key and the "L" key at the same time, so your windows computer will be locked.
      For more information, read the Arduino docs: http://arduino.cc/en/Reference/MouseKeyboard
      You can emulate the Keyboard and the Mouse with an Ardunio Leonardo

      posted in Ideas for using NFC Rings
      M
      MacManus
    • RE: Logging into Desktop with Arduino

      it works both.
      Connect it to 5v if it says in the manual.

      posted in Ideas for using NFC Rings
      M
      MacManus
    • RE: Logging into Desktop with Arduino

      Yeah - interesting idea - i will tinker with the code in my next spare time to improve the code.

      posted in Ideas for using NFC Rings
      M
      MacManus
    • RE: Logging into Desktop with Arduino

      @Lokki what are your error messages in the arduino ide?
      @Nairod785 here are some pictures:


      posted in Ideas for using NFC Rings
      M
      MacManus
    • Logging into Desktop with Arduino

      You want to Login to your Desktop with your NFC Ring?
      You have an Arduino Leonardo, an NFC Ring and an Elechouse PN532 reader (v3 recommended)?

      Great, lets build a Log-In Station for your Laptop.
      It works with nearly every password field (Debian Linux Login, Windows 8.1 Login, Keepass tested and worked - BIOS password doesn't work).

      Connect the Elechouse reader to the Arduino Leonardo (see below) and connect the Arduino via USB to your computer.

      PN532 Module <-> Arduino

      GND <-> GND
      VCC <-> 3v3
      SDA <-> SDA (on Arduino Leonardo D2)
      SCL <-> SCL (on Arduino Leonardo D3)

      So here's the code:

      #include <EEPROM.h>
      
      /**************************************************************************/
      /*!
      Autor: Pascal König
      Website: http://blog.koenig-pascal.de
      
      Elechouse NFC Module v2.0
      Library: https://github.com/elechouse/PN532
      NFC Code Template: https://github.com/JohnMcLear/NFC_Ring_Arduino_Door_Lock/blob/master/NFC_Door_Lock.ino
      
      */
      /**************************************************************************/
      
      
      #include <Wire.h>
      #include <PN532_I2C.h>
      #include <PN532.h>
      
      PN532_I2C pn532i2c(Wire);
      PN532 nfc(pn532i2c);
      
      
      void setup(void) {
        Keyboard.begin();
        Serial.begin(115200);
        Serial.println("Hello!");
      
        nfc.begin();
      
        uint32_t versiondata = nfc.getFirmwareVersion();
        if (! versiondata) {
          Serial.print(versiondata);
          Serial.print("Didn't find PN53x board");
          while (1); // halt
        }
        
        // Got ok data, print it out!
        Serial.print("Found chip PN5"); Serial.println((versiondata>>24) & 0xFF, HEX);
        Serial.print("Firmware ver. "); Serial.print((versiondata>>16) & 0xFF, DEC);
        Serial.print('.'); Serial.println((versiondata>>8) & 0xFF, DEC);
        
        // Set the max number of retry attempts to read from a card
        // This prevents us from waiting forever for a card, which is
        // the default behaviour of the PN532.
        nfc.setPassiveActivationRetries(0xFF);
        
        // configure board to read RFID tags
        nfc.SAMConfig();
          
        Serial.println("Waiting for an ISO14443A card");
      }
      
      void loop(void) {
        String ringUid;
        boolean success;
        uint8_t uid[] = { 0, 0, 0, 0, 0, 0, 0 }; // Buffer to store the returned UID
        uint8_t uidLength; // Length of the UID (4 or 7 bytes depending on ISO14443A card type)
        
        // Wait for an ISO14443A type cards (Mifare, etc.). When one is found
        // 'uid' will be populated with the UID, and uidLength will indicate
        // if the uid is 4 bytes (Mifare Classic) or 7 bytes (Mifare Ultralight)
        success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, &uid[0], &uidLength);
        
        if (success) {
          // Display some basic information about the card
          // Serial.println("Found an ISO14443A card");
          // Serial.print(" UID Length: "); Serial.print(uidLength, DEC); Serial.println(" bytes");
          Serial.print(" UID Value: ");
          for (uint8_t i = 0; i < uidLength; i++)
          {
            //Serial.print("..");
            //Serial.print(uid[i], HEX);
            ringUid += String(uid[i], HEX);
      
          }
          //Serial.println(ringUid + "\n");
          Serial.println(ringUid);
          if(ringUid == "publicRingUID"){
            Serial.println("public");
          }
          else if (ringUid == "privateRingUID"){
            Serial.println("private");
            Keyboard.println("password");
            delay(5000);
          }
        }
      }
      

      Change your password at the end of the code (in the private Ring Area).

      And here's a video

      If you have questions: Feel free to ask.

      posted in Ideas for using NFC Rings arduino
      M
      MacManus
    • RE: USB dongle NFC reader capable, auto login into computer when detects ring?

      should be no problem with an arduino leonardo (or similar) and an elechouse nfc reader.
      In my next free time - i will try this.

      posted in Ideas for using NFC Rings
      M
      MacManus
    • RE: Switch Light with your NFC Ring

      Here are more Pictures:



      Do you want pictures of anything in particular?

      posted in Ideas for using NFC Rings
      M
      MacManus
    • RE: Switch Light with your NFC Ring

      Now, here we go:

      Diagram

      Short Description:

      Connect the PN532 Module as follows:

      PN532 Module <-> Arduino

      GND <-> GND
      VCC <-> 3v3
      SDA <-> SDA (on Arduino Uno A4)
      SCL <-> SCL (on Arduino Uno A5)

      For TWI Pins of other Boards, see Arduino Boards Page

      Connect the 433Mhz Transmitter as follows:

      433Mhz Transmitter <-> Arduino

      DATA <-> Data Pin (i use Pin 10)
      VCC <-> 3v3
      GND <-> GND

      Do you have any questions? Feel free to ask!

      posted in Ideas for using NFC Rings
      M
      MacManus
    • RE: Switch Light with your NFC Ring

      Hi @Lokki thanks - I already ordered an Elechouse V3 Reader, but till it arrives i build the prototype with my v2 reader.

      So here's an Image:
      Light Switch

      The parts list:

      • An Arduino
      • Elechouse PN532 reader (V3 recommended - see @Lokki comment
      • 433Mhz Transmitter (e.g. from eBay)
      • a working outlet device (see here)

      And the source code:

      #include <EEPROM.h>
      
      /**************************************************************************/
      /*!
      Autor: Pascal König
      Website: http://blog.koenig-pascal.de
      
      Elechouse NFC Module v2.0
      Library: https://github.com/elechouse/PN532
      NFC Code Template: https://github.com/JohnMcLear/NFC_Ring_Arduino_Door_Lock/blob/master/NFC_Door_Lock.ino
      
      RCSwitch Library: https://code.google.com/p/rc-switch/
      
      */
      /**************************************************************************/
      
      #include <RCSwitch.h>
      
      RCSwitch mySwitch = RCSwitch();
      
      
      #include <Wire.h>
      #include <PN532_I2C.h>
      #include <PN532.h>
      
      PN532_I2C pn532i2c(Wire);
      PN532 nfc(pn532i2c);
      
      
      void setup(void) {
        mySwitch.enableTransmit(10);
      
        Serial.begin(115200);
        Serial.println("Hello!");
      
        nfc.begin();
      
        uint32_t versiondata = nfc.getFirmwareVersion();
        if (! versiondata) {
          Serial.print(versiondata);
          Serial.print("Didn't find PN53x board");
          while (1); // halt
        }
        
        // Got ok data, print it out!
        Serial.print("Found chip PN5"); Serial.println((versiondata>>24) & 0xFF, HEX);
        Serial.print("Firmware ver. "); Serial.print((versiondata>>16) & 0xFF, DEC);
        Serial.print('.'); Serial.println((versiondata>>8) & 0xFF, DEC);
        
        // Set the max number of retry attempts to read from a card
        // This prevents us from waiting forever for a card, which is
        // the default behaviour of the PN532.
        nfc.setPassiveActivationRetries(0xFF);
        
        // configure board to read RFID tags
        nfc.SAMConfig();
          
        Serial.println("Waiting for an ISO14443A card");
      }
      
      void loop(void) {
        String ringUid;
        boolean success;
        uint8_t uid[] = { 0, 0, 0, 0, 0, 0, 0 }; // Buffer to store the returned UID
        uint8_t uidLength; // Length of the UID (4 or 7 bytes depending on ISO14443A card type)
        
        // Wait for an ISO14443A type cards (Mifare, etc.). When one is found
        // 'uid' will be populated with the UID, and uidLength will indicate
        // if the uid is 4 bytes (Mifare Classic) or 7 bytes (Mifare Ultralight)
        success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, &uid[0], &uidLength);
        
        if (success) {
          // Display some basic information about the card
          // Serial.println("Found an ISO14443A card");
          // Serial.print(" UID Length: "); Serial.print(uidLength, DEC); Serial.println(" bytes");
          Serial.print(" UID Value: ");
          for (uint8_t i = 0; i < uidLength; i++)
          {
            //Serial.print("..");
            //Serial.print(uid[i], HEX);
            ringUid += String(uid[i], HEX);
      
          }
          //Serial.println(ringUid + "\n");
          Serial.println(ringUid);
          if(ringUid == "YourFrontRingUID"){
            Serial.println("public");
            mySwitch.switchOn("11111", 1);
          }
          else if (ringUid == "YourBackRingUID"){
            Serial.println("private");
            mySwitch.switchOff("11111", 1);
          }
        }
      }
      

      The schematics, an arduino diagram and a little howto is following.

      posted in Ideas for using NFC Rings
      M
      MacManus
    • Switch Light with your NFC Ring

      So here's a video of my prototype for a light switch with Arduino.
      Code, Tutorial and Images are following.
      https://mediacru.sh/uuF-Ulrhdwey

      posted in Ideas for using NFC Rings nfc ring arduino
      M
      MacManus