Skip to content

Instantly share code, notes, and snippets.

@sergiocasero
Created January 28, 2017 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sergiocasero/cd0b6388d1645b970deba8ba62758f63 to your computer and use it in GitHub Desktop.
Save sergiocasero/cd0b6388d1645b970deba8ba62758f63 to your computer and use it in GitHub Desktop.
private void switchRelay(String key, Boolean value) {
try {
for (Relay relay : relays) {
if (relay.getId().equals(key)) {
relay.getGpio().setValue(value);
}
}
} catch (IOException e) {
e.printStackTrace();
}
view.showConnectionInformation(relays);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment