Jump to content

Multiplexed switch idea


theonewhoknocks

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...