theonewhoknocks Posted March 7, 2017 Share Posted March 7, 2017 I don't know if this is practical at all, but I think it'd be pretty cool to be able to flip the switch a series of times to access different payloads or render the bunny inactive/active. Depending on the types of signals you guys use. Does the bunny necessarily restart after you flip the switch or is there an internal kill bash that happens and it switches to execing the other payload? Haven't got mine yet so I don't know. If so, I could probably put conditional logic to hide or disable the scripts. Quote Link to comment Share on other sites More sharing options...
rastating Posted March 7, 2017 Share Posted March 7, 2017 5 hours ago, theonewhoknocks said: I don't know if this is practical at all, but I think it'd be pretty cool to be able to flip the switch a series of times to access different payloads or render the bunny inactive/active. Depending on the types of signals you guys use. Does the bunny necessarily restart after you flip the switch or is there an internal kill bash that happens and it switches to execing the other payload? Haven't got mine yet so I don't know. If so, I could probably put conditional logic to hide or disable the scripts. Changing the switch position doesn't currently restart it / execute the payload associated with the new switch position. Quote Link to comment Share on other sites More sharing options...
theonewhoknocks Posted March 7, 2017 Author Share Posted March 7, 2017 If it only reads it at boot, I can probably rig up a script to read the states of the switch as it's probably tied to something in /dev/. Then the real fun can begin. Quote Link to comment Share on other sites More sharing options...
rastating Posted March 7, 2017 Share Posted March 7, 2017 2 hours ago, theonewhoknocks said: If it only reads it at boot, I can probably rig up a script to read the states of the switch as it's probably tied to something in /dev/. Then the real fun can begin. That'd be cool! Let me know if you figure it out, as it'd be handy to have the state detection Quote Link to comment Share on other sites More sharing options...
Sebkinne Posted March 8, 2017 Share Posted March 8, 2017 You can simply poll the following GPIOs: /sys/class/gpio_sw/PA8/data /sys/class/gpio_sw/PL4/data /sys/class/gpio_sw/PL3/data The value returned will be either 0 (on) or 1 (off). Edit: You'd have to keep track of executing the payloads, as you wouldn't want the switch changing to run a payload if one is still running. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.