Thoughts on shield IO

Home Forums Hardware AutoSense Shield Thoughts on shield IO

This topic contains 8 replies, has 3 voices, and was last updated by Profile photo of Eric Eric 1 year, 5 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #2585
    Profile photo of Eric
    Eric
    Keymaster

    Hey guys.

    I’m starting to plan how I want the IO to work on the shield.  It’s a bit of a gong show with old code that’s been used and refactored many times, I need to pretty much rip it apart and redo it.

    That being said I was hoping to get some feedback of how things should work and what type of options you’d all like to see.

    This is what I’ve come up with:

    Input Pins

    • Are triggered when pulled low.
    • Can be toggle or momentary
    • Can directly trigger a configured output
    • Can trigger system events (music controls, volume, etc…)

    Output Pins

    • When triggered, they can go:
      • High
      • Low
      • Toggle
      • Initiate timer, with option of repeat (on 5 seconds, off 3, repeat x number of times)
    • On power up they can be:
      • High
      • Low
      • Last
    • NEW! Output pins will have status information via color changing.  By default, the status will be directly tied to the output pin it’s controlling, but will have the option to be fed via a separate input pin.  This can be used as a feedback loop to ensure the device actually turned on or off.

    NEW! System Events

    • All button presses will send a broadcast message.  You’ll have the ability to hook into those messages to trigger outputs or other things later on.

    Does anybody have any other use cases they can think of?  I really want to plan this well before doing all the programming.

    #2586
    Profile photo of -Jeff-
    -Jeff-
    Participant

    System events to trigger outputs?

    Example..

    HD radio on.. Turn on amp with one output.  another output for Antenna? While still allowing manual control of those outputs

    #2588
    Profile photo of Eric
    Eric
    Keymaster

    I can see two options, hooking into the existing buttons, or broadcast events.

    You’d have the option for a dedicated button like current, or have a button launch the HD Radio and trigger an output.

    Or I can broadcast events, such as HD Radio being enabled/disabled, and have a way to monitor and act upon it.  I think that would be more flexible.  I need to think of a UI for it.  That’s the hardest part for me.

    I like the second idea, more.  I could send events for just about everything, and you can act upon those events with hardware one way or another.

    #2589
    Profile photo of that_kid
    that_kid
    Participant

    The HD tuner one sounds great, I could use the second output to turn on the antenna circuit. Would it be possible to have a toggle button output which uses an input to change the button color to let you know if something is on/off. Case in point, let’s say I want to turn on a tablet/raspberry pi for the rear passengers, I would have the tablet/raspberry pi connected to an input to let me know if it’s on/off. Hopefully I explained it correctly.

    #2590
    Profile photo of Eric
    Eric
    Keymaster

    So the button wouldn’t actually do anything?  Just display the status of an input?

    #2592
    Profile photo of that_kid
    that_kid
    Participant

    The button would do something but the status would be dependent on a verified action.

    #2593
    Profile photo of Eric
    Eric
    Keymaster

    So for example, in your case, the button would turn output 1, but the status would be displayed from input 3.  And the Pi or whatever would send the appropriate signal when powered on to the input?

    That what you’re thinking?

     

    #2594
    Profile photo of that_kid
    that_kid
    Participant

    Yes that’s exactly what i’m thinking.

     

    #2596
    Profile photo of Eric
    Eric
    Keymaster

    Cool.  The input helps.  Those are ideas I hadn’t thought of that I should be able to include.

  • Author
    Posts
  • #2585
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    Hey guys.

    I’m starting to plan how I want the IO to work on the shield.  It’s a bit of a gong show with old code that’s been used and refactored many times, I need to pretty much rip it apart and redo it.

    That being said I was hoping to get some feedback of how things should work and what type of options you’d all like to see.

    This is what I’ve come up with:

    Input Pins

    • Are triggered when pulled low.
    • Can be toggle or momentary
    • Can directly trigger a configured output
    • Can trigger system events (music controls, volume, etc…)

    Output Pins

    • When triggered, they can go:
      • High
      • Low
      • Toggle
      • Initiate timer, with option of repeat (on 5 seconds, off 3, repeat x number of times)
    • On power up they can be:
      • High
      • Low
      • Last
    • NEW! Output pins will have status information via color changing.  By default, the status will be directly tied to the output pin it’s controlling, but will have the option to be fed via a separate input pin.  This can be used as a feedback loop to ensure the device actually turned on or off.

    NEW! System Events

    • All button presses will send a broadcast message.  You’ll have the ability to hook into those messages to trigger outputs or other things later on.

    Does anybody have any other use cases they can think of?  I really want to plan this well before doing all the programming.

    #2586
    Profile photo of -Jeff-
    -Jeff-
    Participant
    • Offline

    System events to trigger outputs?

    Example..

    HD radio on.. Turn on amp with one output.  another output for Antenna? While still allowing manual control of those outputs

    #2588
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    I can see two options, hooking into the existing buttons, or broadcast events.

    You’d have the option for a dedicated button like current, or have a button launch the HD Radio and trigger an output.

    Or I can broadcast events, such as HD Radio being enabled/disabled, and have a way to monitor and act upon it.  I think that would be more flexible.  I need to think of a UI for it.  That’s the hardest part for me.

    I like the second idea, more.  I could send events for just about everything, and you can act upon those events with hardware one way or another.

    #2589
    Profile photo of that_kid
    that_kid
    Participant
    • Offline

    The HD tuner one sounds great, I could use the second output to turn on the antenna circuit. Would it be possible to have a toggle button output which uses an input to change the button color to let you know if something is on/off. Case in point, let’s say I want to turn on a tablet/raspberry pi for the rear passengers, I would have the tablet/raspberry pi connected to an input to let me know if it’s on/off. Hopefully I explained it correctly.

    #2590
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    So the button wouldn’t actually do anything?  Just display the status of an input?

    #2592
    Profile photo of that_kid
    that_kid
    Participant
    • Offline

    The button would do something but the status would be dependent on a verified action.

    #2593
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    So for example, in your case, the button would turn output 1, but the status would be displayed from input 3.  And the Pi or whatever would send the appropriate signal when powered on to the input?

    That what you’re thinking?

     

    #2594
    Profile photo of that_kid
    that_kid
    Participant
    • Offline

    Yes that’s exactly what i’m thinking.

     

    #2596
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    Cool.  The input helps.  Those are ideas I hadn’t thought of that I should be able to include.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.