{"id":453,"date":"2018-02-10T00:39:27","date_gmt":"2018-02-09T15:39:27","guid":{"rendered":"http:\/\/seedslight.com\/wp\/?p=453"},"modified":"2018-04-01T20:05:00","modified_gmt":"2018-04-01T11:05:00","slug":"rfid%e3%81%ae%e9%85%8d%e7%b7%9a","status":"publish","type":"post","link":"https:\/\/seedslight.com\/wp\/archives\/453","title":{"rendered":"RFID\u306e\u914d\u7dda\u3068Arduino\u30b9\u30b1\u30c3\u30c1"},"content":{"rendered":"<h1>\u4f7f\u3063\u305f\u90e8\u54c1\u3001\u3064\u306a\u3052\u305f\u3044\u30d1\u30fc\u30c4<\/h1>\n<p>\u30fbArduino Nano(\u4e92\u63db\u88fd\u54c1\uff09<br \/>\n\u30fbRFID-RC522\uff08MFRC-RC522\u3068\u3082\u8868\u8a18\u3055\u308c\u3066\u3044\u308b\u3051\u308c\u3069\u3001\u9055\u3044\u304c\u5224\u3089\u306a\u3044\u3067\u3059\uff09\u6a29\u5229\u3068\u304b\u8abf\u67fb\u4e0d\u8db3\u3067\u5206\u304b\u3063\u3066\u3044\u306a\u3044\u3067\u3059\u3002<br \/>\n\u53c2\u8003<a href=\"http:\/\/www.orangetags.jp\/words\/mifare\">http:\/\/www.orangetags.jp\/words\/mifare<\/a><br \/>\n\u30fb\u3053\u308c\u3089\u30925cm x 7cm\u306e\u30e6\u30cb\u30d0\u30fc\u30b5\u30eb\u57fa\u677f\u306b\u3002<\/p>\n<h1>\u914d\u7dda\u3057\u305f\u69d8\u5b50<\/h1>\n<h2>\u53c2\u8003<\/h2>\n<p><a href=\"http:\/\/www.ne.jp\/asahi\/shared\/o-family\/ElecRoom\/ElecHint\/ElecHint.html\">\u96fb\u5b50\u5de5\u4f5c\u306e\u30d2\u30f3\u30c8<\/a><\/p>\n<p>\u3053\u3053\u3067\u66f8\u304b\u308c\u3066\u3044\u305f\u30e6\u30cb\u30d0\u30fc\u30b5\u30eb\u57fa\u677f\u306b\u914d\u7dda\u3059\u308b\u3068\u304d\u3001\u306f\u3093\u3060\u9762\u3068\u914d\u7dda\u9762\u3092\u5206\u3051\u308b\u3068\u3044\u3046\u8003\u3048\u65b9\u304c\u3042\u308b\u3068\u3044\u3046\u3053\u3068\u304c\u5b09\u3057\u304b\u3063\u305f\u3002<br \/>\n\u307e\u3063\u3055\u3089\u304b\u3089\u6311\u3080\u3068\u304d\u306b\u5e38\u8b58\u3068\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u3082\u8a00\u8449\u3067\u66f8\u304d\u8d77\u3053\u3057\u3066\u3082\u3089\u3048\u308b\u306e\u3063\u3066\u3068\u3066\u3082\u52a9\u304b\u308b\u3002<br \/>\n\uff08\u3059\u3067\u306b\u5e38\u8b58\u3067\u306f\u306a\u304f\u306a\u3063\u305f\u3053\u3068\u3060\u3068\u3057\u3066\u3082\u3001\u60c5\u5831\u3092\u305f\u3069\u308b\u3046\u3061\u306b\u8a02\u6b63\u3055\u308c\u308b\u304b\u3089\uff09<\/p>\n<h2>\u5b9f\u969b\u306e\u914d\u7dda<\/h2>\n<p><a href=\"https:\/\/seedslight.com\/wp\/wp-content\/uploads\/2018\/02\/IMG_8474.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/seedslight.com\/wp\/wp-content\/uploads\/2018\/02\/IMG_8474.jpg\" alt=\"\" width=\"500\" height=\"601\" class=\"alignnone size-full wp-image-456\" srcset=\"https:\/\/seedslight.com\/wp\/wp-content\/uploads\/2018\/02\/IMG_8474.jpg 500w, https:\/\/seedslight.com\/wp\/wp-content\/uploads\/2018\/02\/IMG_8474-250x300.jpg 250w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>\u3067\u304d\u308b\u3060\u3051\u914d\u7dda\u304c\u30af\u30ed\u30b9\u3057\u306a\u3044\u3088\u3046\u306b\u3068\u4f5c\u3063\u305f\u3064\u3082\u308a\u3060\u304c\u3001\u3069\u3046\u3057\u3066\u3082\u4e00\u304b\u6240\u91cd\u306a\u3063\u3066\u3057\u307e\u3046\u306e\u304c\u3064\u3089\u3044\u3002<br \/>\n\u30c1\u30c3\u30d7\u306e\u4e0b\u306b\u96a0\u308c\u308b\u3088\u3046\u306a\u914d\u7dda\u306f\u826f\u3044\u306e\u304b\u3069\u3046\u304b\u3068\u3044\u3046\u3053\u3068\u306f\u5224\u65ad\u3064\u304b\u306a\u3044\u306e\u3082\uff08\u8ab0\u304b\u6559\u3048\u3066\u307b\u3057\u3044\uff09<br \/>\n\u30d7\u30ea\u30f3\u30c8\u57fa\u677f\u306b\u3057\u305f\u3044\u3068\u601d\u3063\u305f\u308a\u3059\u308b\u3051\u308c\u3069\u3001\u30af\u30ed\u30b9\u3057\u3066\u3044\u308b\u3068\u3053\u308d\u3068\u304b\u3069\u3046\u3059\u308b\u306e\u304b\u306a\u30fc\u3068\u304b\u3001<br \/>\n\u30de\u30a4\u30b3\u30f3\uff0bRFID\u306e\u30c1\u30c3\u30d7\u3067\u3082\u306e\u3059\u3054\u304f\u52b9\u7387\u7684\u306a\u56de\u8def\u8a2d\u8a08\u3082\u3067\u304d\u308b\u3093\u3060\u308d\u3046\u3068\u601d\u3046\u3002\uff08\u53c2\u8003\u306b\u3057\u305f\u300c\u3061\u3087\u3044\u30ed\u30c3\u30af\u30ad\u30fc\u300d\u3067\u306f\u305d\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u305f\uff09<\/p>\n<p>\u914d\u7dda\u3057\u305f\u5f8c\u3067\u3001\u30c6\u30b9\u30bf\u30fc\u306b\u3066\u5c0e\u901a\u30c6\u30b9\u30c8\u3092\u3059\u3079\u3066\u884c\u3044\u3001\u901a\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u305f\u308a\u3002<\/p>\n<h1>\u4f55\u5ea6\u304b\u8a66\u4f5c\uff08\u5931\u6557\uff09\u3057\u305f\u914d\u7dda<\/h1>\n<p>\u7d50\u5c40\u3053\u308c\u3089\u306e\u914d\u7dda\u3092\u57fa\u677f\u306b\u4f5c\u3063\u305f\u3002<br \/>\n1\u3064\u306f\u30b7\u30e7\u30fc\u30c8\u3057\u3066\u3057\u307e\u3063\u3066Arduino\u304c\u713c\u304d\u7126\u3052\u3066\u3057\u307e\u3063\u305f\u308a\u3001\u30d4\u30f3\u30d8\u30c3\u30c0\u306e\u4ed8\u3051\u65b9\u3092\u9593\u9055\u3048\u3066\u4f7f\u3048\u306a\u304b\u3063\u305f\u308a\u3001<br \/>\n5cm x 8cm\u306e\u57fa\u677f\u3058\u3083\u306a\u3044\u3068\u4e57\u3089\u306a\u3044\u3068\u601d\u3044\u8fbc\u3093\u3067\u3044\u3066\u3001\u624b\u306b\u5165\u308a\u306b\u304f\u3044\u57fa\u677f\u4e0a\u306b\u914d\u7dda\u3057\u3066\u3057\u307e\u3063\u305f\u308a\u3002<br \/>\n<a href=\"https:\/\/seedslight.com\/wp\/wp-content\/uploads\/2018\/02\/IMG_8715.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/seedslight.com\/wp\/wp-content\/uploads\/2018\/02\/IMG_8715.jpg\" alt=\"\" width=\"600\" height=\"450\" class=\"alignnone size-full wp-image-458\" srcset=\"https:\/\/seedslight.com\/wp\/wp-content\/uploads\/2018\/02\/IMG_8715.jpg 600w, https:\/\/seedslight.com\/wp\/wp-content\/uploads\/2018\/02\/IMG_8715-300x225.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><br \/>\n\u203b\u6700\u7d42\u7684\u306b\u306f\u53f3\u306e\u7dd1\u8272\u306e\u30e6\u30cb\u30d0\u30fc\u30b5\u30eb\u57fa\u76e45cm x 7cm\u306b\u914d\u7dda\u3057\u305f\u3002<\/p>\n<p>\u3042\u3068\u3001\u4f55\u5ea6\u3082\u540c\u3058\u914d\u7dda\u3092\u3059\u308b\u305f\u3081\u306b\u3001\u81ea\u5206\u306e\u305f\u3081\u306e\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\uff08\u53c2\u7167\u5c02\u7528\uff09\u57fa\u677f\u3092\u4f5c\u3063\u305f\u308a\u3057\u305f\u3002<br \/>\n<a href=\"https:\/\/seedslight.com\/wp\/wp-content\/uploads\/2018\/02\/IMG_8398.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/seedslight.com\/wp\/wp-content\/uploads\/2018\/02\/IMG_8398.jpg\" alt=\"\" width=\"500\" height=\"667\" class=\"alignnone size-full wp-image-457\" srcset=\"https:\/\/seedslight.com\/wp\/wp-content\/uploads\/2018\/02\/IMG_8398.jpg 500w, https:\/\/seedslight.com\/wp\/wp-content\/uploads\/2018\/02\/IMG_8398-225x300.jpg 225w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<h1>Arduino\u30b9\u30b1\u30c3\u30c1<\/h1>\n<p>\u53c2\u8003\u306b\u3057\u305f\u306e\u306f\u3001\u3053\u3061\u3089\u306e\u30b9\u30b1\u30c3\u30c1\u3002Zip\u3067\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3001\u9078\u3076\u3060\u3051<br \/>\n<a href=\"https:\/\/github.com\/miguelbalboa\/rfid\/tree\/master\/examples\">https:\/\/github.com\/miguelbalboa\/rfid\/tree\/master\/examples<\/a><\/p>\n<p>\u5c0e\u5165\u306b\u3064\u3044\u3066\u306f\u3053\u3061\u3089\u3092\u5168\u9762\u7684\u306b\u53c2\u8003\u306b\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3057\u305f\u3002<br \/>\n\u300cArduino\u3067\u8907\u6570\u306eNFC\u30bf\u30b0\u3092\u533a\u5225\u3059\u308b\u300d<br \/>\n<a href=\"https:\/\/qiita.com\/yuji_miyano\/items\/f00f9e3f2edc8025b704\">https:\/\/qiita.com\/yuji_miyano\/items\/f00f9e3f2edc8025b704<\/a><\/p>\n<h2>2018\/3\/23\u6642\u70b9\u306e\u52d5\u3044\u3066\u3044\u308b\u30b9\u30b1\u30c3\u30c1\u304b\u3089<\/h2>\n<pre lang=\"c\">\r\n\/* \u30b7\u30ea\u30a2\u30eb\u51fa\u529b\u3092\u6291\u5236\r\n * --------------------------------------------------------------------------------------------------------------------\r\n * Example sketch\/program showing how to read new NUID from a PICC to serial.\r\n * --------------------------------------------------------------------------------------------------------------------\r\n * This is a MFRC522 library example; for further details and other examples see: https:\/\/github.com\/miguelbalboa\/rfid\r\n * \r\n * Example sketch\/program showing how to the read data from a PICC (that is: a RFID Tag or Card) using a MFRC522 based RFID\r\n * Reader on the Arduino SPI interface.\r\n * \r\n * When the Arduino and the MFRC522 module are connected (see the pin layout below), load this sketch into Arduino IDE\r\n * then verify\/compile and upload it. To see the output: use Tools, Serial Monitor of the IDE (hit Ctrl+Shft+M). When\r\n * you present a PICC (that is: a RFID Tag or Card) at reading distance of the MFRC522 Reader\/PCD, the serial output\r\n * will show the type, and the NUID if a new card has been detected. Note: you may see \"Timeout in communication\" messages\r\n * when removing the PICC from reading distance too early.\r\n * \r\n * @license Released into the public domain.\r\n * \r\n * Typical pin layout used:\r\n * -----------------------------------------------------------------------------------------\r\n *             MFRC522      Arduino       Arduino   Arduino    Arduino          Arduino\r\n *             Reader\/PCD   Uno\/101       Mega      Nano v3    Leonardo\/Micro   Pro Micro\r\n * Signal      Pin          Pin           Pin       Pin        Pin              Pin\r\n * -----------------------------------------------------------------------------------------\r\n * RST\/Reset   RST          9             5         D9         RESET\/ICSP-5     RST\r\n * SPI SS      SDA(SS)      10            53        D10        10               10\r\n * SPI MOSI    MOSI         11 \/ ICSP-4   51        D11        ICSP-4           16\r\n * SPI MISO    MISO         12 \/ ICSP-1   50        D12        ICSP-1           14\r\n * SPI SCK     SCK          13 \/ ICSP-3   52        D13        ICSP-3           15\r\n *\/\r\n\r\n#include <SPI.h>\r\n#include <MFRC522.h>\r\n#include <Servo.h>\r\n#include <avr\/sleep.h>\r\n\r\nconstexpr uint8_t RST_PIN = 9;     \/\/ Configurable, see typical pin layout above\r\nconstexpr uint8_t SS_PIN = 10;     \/\/ Configurable, see typical pin layout above\r\nconstexpr uint8_t SV_PIN = 3;     \/\/ Configurable, see typical pin layout above\r\n\r\nMFRC522 rfid(SS_PIN, RST_PIN); \/\/ Instance of the class\r\n\r\nint pos = 0;    \/\/ variable to store the servo position\r\nServo myservo;  \/\/ create servo object to control a servo\r\n\r\n\/\/ \r\n\/\/unsigned long opentime = 300000; \/\/ 5\u5206\r\n\/\/unsigned long opentime   = 30000; \/\/ 30\u79d2\r\nunsigned long opentime   = 1800000; \/\/ 30\u5206\r\nunsigned long unlocktime = 0; \/\/ \u958b\u9320\u3057\u305f\u6642\u9593\r\nunsigned long checktime  = 0; \/\/ \u7d4c\u904e\u79d2\u6570\r\nunsigned long sleeptime  = 0; \/\/ \u65bd\u9320\u5f8c\u505c\u6b62\u3059\u308b\u6642\u9593\r\nint           servodegree = 180; \/\/ \u81ea\u52d5\u96fb\u6e90OFF\u306e\u305f\u3081\u306b\u96fb\u529b\u8abf\u7bc0\r\nint           servodegree_pulse = 180; \/\/ \u81ea\u52d5\u96fb\u6e90OFF\u306e\u305f\u3081\u306b\u96fb\u529b\u8abf\u7bc0 \u958b\u9320\u6642\u306e\u4e00\u6642\u89d2\u5ea6\r\nint           pulse_count = 0;   \/\/ \u81ea\u52d5\u96fb\u6e90OFF\u306e\u305f\u3081\u306b\u96fb\u529b\u8abf\u7bc0\r\nboolean       close_flag  = true;   \/\/ \u9589\u3081\u305f\u3053\u3068\u3092\u8a18\u9332 true = \u9589\u3081\u305f\u3002false = \u958b\u3044\u305f\r\n\r\nvoid setup() { \r\n  \/\/Serial.begin(9600); \/\/ \u30c7\u30d0\u30c3\u30b0\u7528\r\n  SPI.begin(); \/\/ Init SPI bus\r\n  rfid.PCD_Init(); \/\/ Init MFRC522 \r\n\r\n  \/\/Serial.println(F(\"This code scan the MIFARE Classsic NUID.\"));\r\n  \/\/Serial.print(F(\"Using the following key:\"));\r\n\r\n  myservo.attach(SV_PIN);      \/\/ attaches the servo\r\n  myservo.write(servodegree);  \/\/ deglee 180 is lock\r\n\r\n}\r\n \r\nvoid loop() {\r\n\r\n  MFRC522::MIFARE_Key key; \r\n\r\n  \/\/ \u958b\u3044\u3066\u4e00\u5b9a\u6642\u9593\u3067\u81ea\u52d5\u65bd\u9320\r\n  checktime = millis();\r\n  if (unlocktime != 0 && unlocktime < checktime ){\r\n      \/\/Serial.println(unlocktime);\r\n      \/\/Serial.println(checktime);\r\n      servodegree = 180;\r\n      myservo.write(servodegree);       \/\/ deglee 180 is lock\r\n      close_flag  = true; \/\/ \u9589\u3081\u305f\u30891      \r\n      sleeptime = unlocktime + 60000;\r\n  }\r\n\r\n  \/\/ \u81ea\u52d5\u65bd\u9320\u3057\u305f\u5f8c\u306b\u4e00\u5b9a\u6642\u9593\u3067\u30b9\u30ea\u30fc\u30d7\u3059\u308b\r\n  if (sleeptime != 0 &#038;&#038; sleeptime < checktime ){\r\n    \/\/Serial.println(checktime);\r\n    \/\/delay(3000);\r\n    ADCSRA &#038;= ~(1 << ADEN); \/\/ ADEN\u30d3\u30c3\u30c8\u3092\u30af\u30ea\u30a2\u3057\u3066ADC\u3092\u505c\u6b62\uff08120\u03bcA\u7bc0\u7d04\uff09\r\n    set_sleep_mode(SLEEP_MODE_PWR_DOWN); \/\/ \u30d1\u30ef\u30fc\u30c0\u30a6\u30f3\u30e2\u30fc\u30c9\r\n    sleep_enable();\r\n    sleep_mode(); \/\/ \u3053\u3053\u3067\u30b9\u30ea\u30fc\u30d7\u306b\u5165\u308b\r\n  }\r\n\r\n  \/\/ \u96fb\u6e90\u3092\u5165\u308c\u305f\u3060\u3051\u3067\u3001\u958b\u9320\u3057\u306a\u3044\u307e\u307e\u4e00\u5b9a\u6642\u9593\u904e\u304e\u305f\u3089\u30b9\u30ea\u30fc\u30d7\u3059\u308b\u3002\r\n  \/\/ \u4f55\u3082\u7121\u304b\u3063\u305f\u5834\u5408\u3001\u6700\u7d42\u884c\u306edelay 1000\u30671\u79d2\u5f85\u6a5f\u306a\u306e\u3067\u3001300\u79d2=5\u5206\u306e\u8a08\u7b97\r\n  if(sleeptime == 0 &#038;&#038; unlocktime == 0 &#038;&#038; pulse_count > 300){\r\n    ADCSRA &= ~(1 << ADEN); \/\/ ADEN\u30d3\u30c3\u30c8\u3092\u30af\u30ea\u30a2\u3057\u3066ADC\u3092\u505c\u6b62\uff08120\u03bcA\u7bc0\u7d04\uff09\r\n    set_sleep_mode(SLEEP_MODE_PWR_DOWN); \/\/ \u30d1\u30ef\u30fc\u30c0\u30a6\u30f3\u30e2\u30fc\u30c9\r\n    sleep_enable();\r\n    sleep_mode(); \/\/ \u3053\u3053\u3067\u30b9\u30ea\u30fc\u30d7\u306b\u5165\u308b\r\n  }\r\n\r\n  \/\/ \u4f55\u3082\u305b\u305a\u306b\u5468\u56de\u3057\u305f\u56de\u6570\u306e\u30ab\u30a6\u30f3\u30bf\u30fc\r\n  pulse_count = pulse_count + 1;\r\n  \/\/Serial.println(servodegree_pulse);\r\n\r\n  \/\/ \u4e00\u5b9a\u6642\u9593\u3067\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u306b\u96fb\u529b\u6d88\u8cbb\u3092\u4fc3\u3059(0.2s * 20 = 4\u79d2)\r\n  if ( ! rfid.PICC_IsNewCardPresent() || ! rfid.PICC_ReadCardSerial()){\r\n    delay(200);\r\n    if ( pulse_count > 20 && close_flag == false){\r\n      servodegree_pulse = 75;\r\n      myservo.write(servodegree_pulse);\r\n      pulse_count = 0;\r\n      delay(500);\r\n    } else {\r\n      myservo.write(servodegree);\r\n      delay(500);\r\n    }\r\n    return;\r\n }\r\n\r\n  MFRC522::PICC_Type piccType = rfid.PICC_GetType(rfid.uid.sak);\r\n\r\n  \/\/ \u8a8d\u8a3c\u7528\r\n  \/\/ Prepare key - all keys are set to FFFFFFFFFFFFh at chip delivery from the factory.\r\n  for (byte i = 0; i < 6; i++) key.keyByte[i] = 0xFF;\r\n  \r\n  byte block;\r\n  MFRC522::StatusCode status;\r\n  byte len;\r\n\r\n  \/\/ Check is the PICC of Classic MIFARE type\r\n  if (piccType != MFRC522::PICC_TYPE_MIFARE_MINI &#038;&#038;  \r\n    piccType != MFRC522::PICC_TYPE_MIFARE_1K &#038;&#038;\r\n    piccType != MFRC522::PICC_TYPE_MIFARE_4K) {\r\n    \/\/Serial.println(F(\"Your tag is not of type MIFARE Classic.\"));\r\n    return;\r\n  }\r\n\r\n  block = 1;\r\n  \/\/Serial.println(F(\"Authenticating using key A...\"));\r\n  status = rfid.PCD_Authenticate(MFRC522::PICC_CMD_MF_AUTH_KEY_A, block, &#038;key, &#038;(rfid.uid));\r\n  if (status != MFRC522::STATUS_OK) {\r\n    \/\/Serial.print(F(\"PCD_Authenticate() failed: \"));\r\n    \/\/Serial.println(rfid.GetStatusCodeName(status));\r\n    return;\r\n  }\r\n  \/\/ else Serial.println(F(\"PCD_Authenticate() success: \"));\r\n\r\n  \/\/ RFID\u306e1block\u3092\u8aad\u307f\u53d6\u308b\u305f\u3081\u306b\u5927\u304d\u3044\u914d\u5217\u3092\u5b9a\u7fa9\u300216+2\r\n  byte buffer_read[18];\r\n  char buffer_char[18];\r\n  status = rfid.MIFARE_Read(block, buffer_read, &#038;len);\r\n  if (status != MFRC522::STATUS_OK) {\r\n    \/\/Serial.print(F(\"Reading failed: \"));\r\n    \/\/Serial.println(rfid.GetStatusCodeName(status));\r\n    return;\r\n  }\r\n\r\n  \/\/ byte\u578b\u3092char\u578b\u306b\u5909\u63db\u3057\u3066String\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4f5c\u6210\r\n  strcpy((char *)buffer_char,buffer_read);\r\n  String get_string = String(buffer_char);\r\n\r\n  \/\/ 7\u6587\u5b57\u3092\u8aad\u307f\u53d6\u3063\u3066\u5224\u5b9a\u3002OK\u306a\u3089\u3070\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u3092\u56de\u3059\u3002\r\n  if(get_string.substring(0,7) == \"SimSim \"){\r\n    servodegree = 80;\r\n    myservo.write(servodegree); \/\/ deglee 90 is UNlock deglee 80 is UNlock sor Osoyoo SG90\r\n    unlocktime = millis() + opentime;\r\n    close_flag  = false; \/\/ \u958b\u3051\u305f\u3089false\r\n    sleeptime  = 0; \/\/ \u958b\u3044\u305f\u3089\u30ea\u30bb\u30c3\u30c8\r\n    \/\/Serial.print(F(\"unlocktime:\"));\r\n    \/\/Serial.println(unlocktime);\r\n  }\r\n  \/\/Serial.print(get_string.substring(0,7));\r\n  \/\/Serial.println(F(\"END\"));\r\n  \r\n  \/\/ Halt PICC\r\n  rfid.PICC_HaltA();\r\n\r\n  \/\/ Stop encryption on PCD\r\n  rfid.PCD_StopCrypto1();\r\n\r\n  delay(1000); \/\/change value if you want to read cards faster\r\n\r\n}\r\n<\/pre>\n<p>\u52c9\u5f37\u3057\u305f\u9806\u756a\u306b\u8a18\u8f09\u3057\u3066\u3044\u3053\u3046\u304b\u306a\u3068\u601d\u3063\u305f\u3051\u308c\u3069\u3001\u307e\u305a\u306f\u52d5\u304f\u3082\u306e\u3092\u898b\u305f\u307b\u3046\u304c\u826f\u3044\u304b\u3068\u601d\u3063\u3066\u3001\u6821\u6b63\u5909\u66f4\u3002<\/p>\n<h1>\u25a0\u8a73\u7d30\u306a\u89e3\u8aac<\/h1>\n<p>\u3053\u308c\u3082\u30da\u30fc\u30b8\u3092\u4f5c\u308a\u6b21\u7b2c\u30ea\u30f3\u30af\u3092\u8ffd\u52a0\u3057\u3066\u3044\u304f\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/seedslight.com\/wp\/archives\/466\">\u5b9a\u6570\u3068\u304b\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7<\/a><\/li>\n<li><a href=\"https:\/\/seedslight.com\/wp\/archives\/502\">\u4e00\u5b9a\u6642\u9593\u3067\u81ea\u52d5\u65bd\u9320\u3084\u81ea\u52d5\u30b9\u30ea\u30fc\u30d7<\/a><\/li>\n<li><a href=\"https:\/\/seedslight.com\/wp\/archives\/503\">\u958b\u3044\u3066\u308b\u9593\u3001\u30d0\u30c3\u30c6\u30ea\u30fc\u304c\u96fb\u6e90\u4f9b\u7d66\u3092\u505c\u6b62\u3057\u306a\u3044\u3088\u3046\u306b\u30a2\u30fc\u30e0\u3092\u52d5\u304b\u3057\u7d9a\u3051\u308b<\/a><\/li>\n<li><a href=\"https:\/\/seedslight.com\/wp\/archives\/504\">RFID\u306e\u7279\u5b9a\u306e\u9818\u57df\u3092\u8aad\u307f\u53d6\u308b<\/a><\/li>\n<li><a href=\"https:\/\/seedslight.com\/wp\/archives\/509\">\u30b5\u30fc\u30dc\u30e2\u30fc\u30bf\u30fc\u3092\u56de\u3057\u3066\u958b\u9320\u3059\u308b<\/a><\/li>\n<\/ul>\n<h1>RFID\u306e\u30b5\u30f3\u30d7\u30eb\u3067\u82e6\u52b4\u3057\u305f\u3053\u3068<\/h1>\n<p>\u5225\u306e\u6295\u7a3f\u8a18\u4e8b\u306b\u5909\u66f4\u3002\u5148\u4eba\u306e\u30b5\u30f3\u30d7\u30eb\u306e\u8abf\u67fb\u3092\u3057\u305f\u3060\u3051\u3060\u3063\u305f\u3093\u3067\u3002<br \/>\n<a href=\"https:\/\/seedslight.com\/wp\/archives\/464\">RFID\u306e\u30b5\u30f3\u30d7\u30eb\u30b9\u30b1\u30c3\u30c1\u3067\u306e\u767a\u898b<\/a><\/p>\n<h1>\u25a0\u5b9f\u88c5\u3092\u898b\u9001\u3063\u305f\u6280\u8853\u3001\u5931\u6557\u9332<\/h1>\n<ul>\n<li><a href=\"https:\/\/seedslight.com\/wp\/archives\/511\">RFID\u306e\u8b58\u5225\u306bUID\u3092\u4f7f\u304a\u3046\u3068\u601d\u3044Arduino\u5074\u306eEEPROM\u3078\u306e\u8aad\u307f\u66f8\u304d\u306b\u3066\u5b9f\u88c5\u3057\u305f\u3053\u3068<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u3063\u305f\u90e8\u54c1\u3001\u3064\u306a\u3052\u305f\u3044\u30d1\u30fc\u30c4 \u30fbArduino Nano(\u4e92\u63db\u88fd\u54c1\uff09 \u30fbRFID-RC522\uff08MFRC-RC522\u3068\u3082\u8868\u8a18\u3055\u308c\u3066\u3044\u308b\u3051\u308c\u3069\u3001\u9055\u3044\u304c\u5224\u3089\u306a\u3044\u3067\u3059\uff09\u6a29\u5229\u3068\u304b\u8abf\u67fb\u4e0d\u8db3\u3067\u5206\u304b\u3063\u3066\u3044\u306a\u3044\u3067\u3059\u3002 \u53c2\u8003http:\/\/w [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[113,111],"tags":[114,112,110],"class_list":["post-453","post","type-post","status-publish","format-standard","hentry","category-arduino","category-111","tag-arduino","tag-112","tag-110"],"_links":{"self":[{"href":"https:\/\/seedslight.com\/wp\/wp-json\/wp\/v2\/posts\/453","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/seedslight.com\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/seedslight.com\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/seedslight.com\/wp\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/seedslight.com\/wp\/wp-json\/wp\/v2\/comments?post=453"}],"version-history":[{"count":0,"href":"https:\/\/seedslight.com\/wp\/wp-json\/wp\/v2\/posts\/453\/revisions"}],"wp:attachment":[{"href":"https:\/\/seedslight.com\/wp\/wp-json\/wp\/v2\/media?parent=453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/seedslight.com\/wp\/wp-json\/wp\/v2\/categories?post=453"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/seedslight.com\/wp\/wp-json\/wp\/v2\/tags?post=453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}