Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/RobTillaart/Arduino
/ add
Method
add
libraries/PIR/PIR.cpp:24–30 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
22
23
24
uint8_t PIR::add(uint8_t pin)
25
{
26
if (_count >= 8) return PIR_ERR_ARRAY_FULL;
27
_pins[_count++] = pin;
28
pinMode(pin, INPUT_PULLUP);
29
return _count - 1;
30
}
31
32
33
uint8_t PIR::count()
Callers
1
unittest
Function · 0.45
Calls
no outgoing calls
Tested by
1
unittest
Function · 0.36