Skip to content

Start synapse from a Raspberry Pi digital input received on a GPIO pin

Notifications You must be signed in to change notification settings

kalliope-project/kalliope_signal_gpio_input

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kalliope Gpio input signal

Synopsis

Launch synapses from from a Raspberry Pi digital input received on a GPIO pin.

This Kalliope signal can be used for example with the following hardware:

  • button
  • Magnetic switch
  • PIR sensor

example_button

Installation

kalliope install --git-url https://github.com/kalliope-project/kalliope_signal_gpio_input.git

Options

parameter required default choices comment
pins YES List of GPIO PIN number (BCM)

Values sent to the synapse

Name Description Type sample
gpio_input_pin_number PIN number pressed int 17
gpio_input_pin_counter Number of time the pin number has switched status since Kalliope has started int 23

Synapses example

Simple example

- name: "gpio-test"
  signals:
    - gpio_input:
        pins:
          - 4          
  neurons:
    - say:
        message: "Button pressed !"  

This synapse is bind to multiple pin and will give you the PIN number that has changed status

- name: "gpio-test2"
  signals:
    - gpio_input:
        pins:
          - 27
          - 17
          - 22
  neurons:
    - say:
        message: "you've have pressed the button attached to the pin {{ gpio_input_pin_number }} {{ gpio_input_pin_counter }} time"  

This signal can be used for example to mute and unmute Kalliope

- name: "gpio-unmute"
  signals:
    - gpio_input:
        pins:
          - 27
  neurons:
    - settings:
          mute: False
    - say:
        message: "I'm now listenning to you"
        
- name: "gpio-mute"
  signals:
    - gpio_input:
        pins:
          - 22
  neurons:
    - settings:
         mute: True
    - say:
        message: "I'm not listening anymore"

Notes

Note: This signal only work on Raspberry Pi

About

Start synapse from a Raspberry Pi digital input received on a GPIO pin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages