Get GPIO Status without declaring it as input under devices ?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
iron
Normal user
Posts: 221
Joined: 24 Sep 2016, 08:37
Location: Greece
Contact:

Get GPIO Status without declaring it as input under devices ?

#1 Post by iron » 29 Oct 2018, 08:58

status,gpio,<pin number> responds a "?" if the pin is not declared in the devices / tasks.
No problem doing so but this ends up "eating up" one the only 12 available tasks.

Thanx
-D
-D

User avatar
iron
Normal user
Posts: 221
Joined: 24 Sep 2016, 08:37
Location: Greece
Contact:

Re: Get GPIO Status without declaring it as input under devices ?

#2 Post by iron » 01 Nov 2018, 17:34

To answer my own Q.

status,gpio,<pin number> returns the status even if it is not declared in the devices as input.

It only returns "?" if the gpio has not been triggered since boot (still in float state ?)

If you call it once either high or low it will then return it's status.

-D
-D

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 150 guests