Skip to content

Instantly share code, notes, and snippets.

@renaudfv
Created February 7, 2023 19:11
Show Gist options
  • Save renaudfv/392cd394068572a6c31178c89c078912 to your computer and use it in GitHub Desktop.
Save renaudfv/392cd394068572a6c31178c89c078912 to your computer and use it in GitHub Desktop.
Processing sketch on how to synchronously ping devices
import java.net.*;
void setup() {}
void draw() {
if(frameCount % 100 == 0) {
try {
println("Is online " + InetAddress.getByName("192.168.0.128").isReachable(1000));
} catch(Exception e) {
println(e.toString());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment