Skip to content

Instantly share code, notes, and snippets.

@sergiocasero
Last active January 28, 2017 20:45
Show Gist options
  • Save sergiocasero/5622801c0d349607cdc8afb2378a6ae0 to your computer and use it in GitHub Desktop.
Save sergiocasero/5622801c0d349607cdc8afb2378a6ae0 to your computer and use it in GitHub Desktop.
Models
// Uploading relays
try {
for (Relay relay : relays) {
RelayDto relayDto = new RelayDto(relay.getLabel(), relay.getGpio().getValue());
relayReference.child(relay.getId()).setValue(relayDto);
}
} catch (IOException e) {
e.printStackTrace();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment