You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -147,7 +147,8 @@ SensorPH | 1 | PH ( SKU SEN161 ) sensor, measure the analog
147
147
SensorPca9685W | 2 | Generic dimmer sensor (S_DIMMER) used to drive a single channel pwm output of PCA9685 | https://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library
148
148
SensorPca9685Rgb | 2 | Generic RGB-dimmer sensor (S_RGB_LIGHT) used to drive RGB resp. 3-channel pwm output of PCA9685 | https://github.com/adafruit/Adafruit-PWM-Servo- Driver-Library
149
149
SensorPca9685Rgbw | 2 | Generic RGBW-dimmer sensor (S_RGBW_LIGHT) used to drive RGBW resp. 4-channel pwm output of PCA9685| https://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library
150
-
SensorDSM501A | 1 | ust sensor module DSM501A for PM1.0 and PM2.5 particles | -
150
+
SensorDSM501A | 1 | Dust sensor module DSM501A for PM1.0 and PM2.5 particles | -
151
+
SensorPN532 | 1 | PN532 NFC RFID Module | https://github.com/elechouse/PN532
151
152
152
153
Those sensors requiring a pin to operate would take it as an argument in the constructor.
153
154
NodeManager automatically creates all the child_ids, assigning an incremental counter. If you need to set your own child_id, pass it as the last argument to the constructor
@@ -946,6 +947,14 @@ Each sensor class may expose additional methods.
946
947
voidsetTemperature(int value);
947
948
~~~
948
949
950
+
* SensorPN532
951
+
~~~c
952
+
// [101] wait for a valid card for the given amount of seconds. Useful when battery powered (default: 0)
953
+
void setWaitCardForSeconds(int value);
954
+
// return true if the card was recognized successfully, false otherwise. Useful when a hook function needs to act upon the result
955
+
bool getCardIsValid();
956
+
~~~
957
+
949
958
### OTA Configuration
950
959
951
960
When `NODEMANAGER_OTA_CONFIGURATION` is set to ON the API presented above can be also called remotely through `SensorConfiguration`, which is automatically added to NodeManager. SensorConfiguration exposes by default child id 200 that can be used to interact with the service by sending `V_CUSTOM` type of messages and commands within the payload. For each `REQ` message, the node will respond with a `SET` message if successful.
// 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.
63
+
_nfc->setPassiveActivationRetries(0xFF);
64
+
// configure board to read RFID tags
65
+
_nfc->SAMConfig();
66
+
// report immediately
67
+
setReportTimerMode(IMMEDIATELY);
68
+
};
69
+
70
+
// define what to do during loop
71
+
voidonLoop(Child* child) {
72
+
// Buffer to store the returned UID
73
+
uint8_t uid[] = { 0, 0, 0, 0, 0, 0, 0 };
74
+
// Length of the UID (4 or 7 bytes depending on ISO14443A card type)
0 commit comments