Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a read-the-gpio-value function #22

Open
ronanguilloux opened this issue Apr 26, 2015 · 2 comments
Open

Add a read-the-gpio-value function #22

ronanguilloux opened this issue Apr 26, 2015 · 2 comments
Assignees

Comments

@ronanguilloux
Copy link
Owner

No description provided.

@ronanguilloux ronanguilloux self-assigned this Apr 26, 2015
@Tjoosten
Copy link

Tjoosten commented May 8, 2015

/**
 * Read pin value.
 * 
 * @param int, $pinNo
 * @return bool|string
  */
 public function readValuePin($pinNo) {
     if (!$this->isValidPin($pinNo)) {
         return false;
     }

     return trim(file_get_contents(GpioInterface::PATH_GPIO.$pinNo.'/value'));
}

in this way?

@Tjoosten
Copy link

@ronanguilloux ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants