Skip to content

Instantly share code, notes, and snippets.

@Immortal-
Last active April 9, 2016 05:29
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Immortal-/c032136484afa32da0e1de5fde76e2f0 to your computer and use it in GitHub Desktop.
Ussing OmegaPHP.php
<?php
require 'OmegaPHP.php'; //Require Our Library You can get at https://gist.github.com/Immortal-/a18f58ac5c21ba27921b7626b5a8b06e
$gpio = new OmegaPHP();
//Turns pin 0 to On or HIGH or 1
$pin = (int)0; //This is just for my testing purposes You do not have to cast to an int.
$gpio->SetPIN($pin,HIGH);// Set's the pin to 1 or HIGH
$returned = $gpio->ReadPin($pin);
print_r($returned);
// Prints to screen:
// 1
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment