Instantly share code, notes, and snippets.

Embed
What would you like to do?
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