Introducing the Humble_RPi-plugin-piezoelements gem

Testing the plugin

require 'humble_rpi-plugin-piezoelements'


rpi = HumbleRPiPluginPiezoElements.new(settings: {pin: 4}, variables: {})
rpi.start
rpi.on_piezoelements_message 'buzz'

Using the plugin with the Humble RPi gem

require 'humble_rpi'
require 'humble_rpi-plugin-piezoelements'

r = HumbleRPi.new device_name: 'sol', sps_address: '192.168.4.140',\
  plugins: {PiezoElements: {pin: 4} }
r.start

Resources