# !! BEWARE !! # Accidentally using a pin as an output with the output shorted will break your Pi, # always use a series resistor on every input and output. # Subjecting inputs to voltages outside the Pi's allowable range will break your Pi even with the series resistor. # This file in /pipresents/pp_resources/pp_templates may be overwritten by updates and is not used by Pi Presents # copy the file to the profile that is to use it. # There is no checking of the content of this file by Pi Presents, try any changes by # running from a terminal window so that any exceptions are reported # USE # === # This file binds physical RPi GPIO input and output pins to the symbolic names of inputs and outputs used by Pi Presents # It also configures the input pins. # Pins refer to the Pi's P1 connector. # A section for every pin must be present in the file with a direction of in, out or none. A pin with direction = none is ignored. # INPUTS # ------- # Each input pin can generate an event having the specified symbolic name in any of four ways. # * rising edge - An event with the symbolic name specified in 'rising-name' is generated when the input changes from 0 to 1 (0 volts to 3.3 volts) # * falling edge - An event with the symbolic name specified in 'falling-name' is generated when the input changes from 1 to 0 (3.3 volts to 0 volts) # * one state - An event with the symbolic name specified in 'one-name'is generated at 'repeat' intervals while the input state is '1' (3.3 volts) # * zero state - An event with the symbolic name specified in 'zero-name'is generated at 'repeat' intervals while the input state is '0' (0 volts). # The repeat time is 50mS. # If you do not want the event to be generated leave the symbolic name blank # optional fields # linked-output - the input pin is directly connected to the output pin. linked-invert inverts the logic (in=1>out=0,in=0>out=1) # Example of an unused pin # [P1-07] # direction = none # Example of an input pin # [P1-07] # pin number of P1 connector # direction = in # always in for inputs # rising-name = # the symbolic name for a rising edge event 0>1 # falling-name = pp-stop # the symbolic name for a falling edge event 1>0 # one-name = # symbolic name for a one state event # zero-name = # symbolic name for a zero state event # repeat = # state repeat interval (50mS intervals) # threshold = 2 # the de-bounce threshold # pull-up-down = up # up/down/blank. blank = none. # optional fields # linked-output = myoutput # logical name of an output pin # linked-invert = yes # yes/no linked pin is inverted # Example of an input for a pin used to trigger a hyperlink. It is best to avoid symbolic names beginning with pp- to avoid conflict with any future updates to Pi Presents # [P1-08] # pin number of P1 connector # direction = in # always in for inputs # rising-name = # the symbolic name for a rising edge event 0->1 # falling-name = my-link # the symbolic name for a falling edge event 1->0 # one-name = # symbolic name for a one state event # zero-name = # symbolic name for a zero state event # repeat = x state repeat interval (50mS steps) # threshold = 2 # the de-bounce threshold # pull-up-down = up # up/down/none. # OUTPUTS # ------- # - the logical 'on' state equates to GPIO.output(pin, True) and produces +3.3 volts # - the logical 'off' state produces 0 volts # - The RPi and Pi Presents initialises GPIO outputs to 0 volts so it is best to design relays etc. for positive logic. # Example of an output section # [P1-08] # pin number of P1 connector # direction = out # always out for outputs # name = myoutput # a logical name use by Pi Presents and defined in animation fields # THIS TEMPLATE # ============= # The templates and examples of Pi Presents bind the following symbolic names to commands used by mediashow, liveshow and menu and to some special commands. # So that gpio can be used with the examples these symbolic names are assigned to an arbitrary set of pins in this file. You will want to modify them for your application: # pp-shutdown stop - initiates shutdown (needs to be asserted for 5 seconds) # pp-down down - move down a menu or next track in a mediashow # pp-up up - move up a menu or previous track in a mediashow # pp-play play - start playing a menu track # pp-pause pause - toggle pause in relevent tracks # pp-stop stop - stop tracks and shows # pp-exit exit - stop tracks and shows (see manula for difference to pp-stop) # PIR - used as the trigger input for the exhibit example # Other symbolic names for inputs can be defined in profiles and used for: # to initiate link commands in hyperlinkshows # to initiate tracks in radiobuttonshows # for start-trigger end-trigger and next-trigger in mediashows # The examples, manual and assignments below assume the use of normally open push buttons connected to ground (0 volts) and a PIR with normally closed contacts connected to ground. # pp_shutdown - note the special conditions for this button in its entry # THE PINS # ------- # Has a permanent 1K8 pull up resistor, so use for input and output with care [P1-03] direction = none # Has a permanent 1K8 pull up resistor,so use for input and output with care [P1-05] direction = none [P1-07] direction = in rising-name = falling-name = pp-stop one-name = zero-name = repeat = threshold = 2 pull-up-down = up [P1-08] direction = none [P1-10] direction = none # PIR is used as a trigger event in some examples [P1-11] direction = in rising-name = PIR falling-name = one-name = zero-name = repeat = threshold = 2 pull-up-down = up # any pin can be the pp-shutdown pin # the shutdown operation must have the symbolic name pp-shutdown # the pin assigned to pp-shutdown must use only the falling-name # the shutdown pin is tested to see if it is zero after 5 seconds. [P1-12] direction = in rising-name = falling-name = pp-shutdown one-name = zero-name = repeat = threshold = 8 pull-up-down = up [P1-13] direction = none [P1-15] direction = in rising-name = falling-name = pp-down one-name = zero-name = repeat = threshold = 2 pull-up-down = up [P1-16] direction = in rising-name = falling-name = pp-up one-name = zero-name = repeat = threshold = 2 pull-up-down = up [P1-18] direction = in rising-name = falling-name = pp-play one-name = zero-name = repeat = threshold = 2 pull-up-down = up [P1-19] direction = none [P1-21] direction = none [P1-22] direction = in rising-name = falling-name = pp-pause one-name = zero-name = repeat = threshold = 2 pull-up-down = up [P1-23] direction = none [P1-24] direction = none [P1-26] direction = none # A+/B+/2B PINS # --------- [P1-29] direction = none [P1-31] direction = none [P1-32] direction = none [P1-33] direction = none [P1-35] direction = none [P1-36] direction = none [P1-37] direction = none [P1-38] direction = none [P1-40] direction = none