From 78e49b7f6edd883ebbe0bcc3dd112be3432eeaad Mon Sep 17 00:00:00 2001 From: Pablo Sun Date: Mon, 25 Jun 2018 15:32:16 +0800 Subject: [PATCH] Fix #190 The default `RST pin` of MFRC522 is 9, which overlaps with I2C pins used by LCD blocks. Since reset is not commonly used, we pass `UINT8_MAX` instead., which supresses the `RST pin` feature of MFRC522. --- edit/generators/mfrc522.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edit/generators/mfrc522.js b/edit/generators/mfrc522.js index a71c2a6..0e6ca4d 100644 --- a/edit/generators/mfrc522.js +++ b/edit/generators/mfrc522.js @@ -31,7 +31,7 @@ Blockly.Arduino.mfrc522_read = function() { Blockly.Arduino.definitions_['define_spi_include'] = '#include \n'; Blockly.Arduino.definitions_['define_mfrc522_include'] = '#include \n'; - Blockly.Arduino.definitions_['define_mfrc522_inst'] = 'MFRC522 rfid(/*SS_PIN*/ 10, /*RST_PIN*/ 9);\n'; + Blockly.Arduino.definitions_['define_mfrc522_inst'] = 'MFRC522 rfid(/*SS_PIN*/ 10, /*RST_PIN*/ UINT8_MAX);\n'; Blockly.Arduino.definitions_['define_mfrc522_readid'] = ` String mfrc522_readID() {