GitHub • RubyGems • Documentation • History
Pipark
A Ruby library for pea-brained control of Raspberry Pi's.
Installing
Pipark is available as a gem. You can simply install it with:
gem install pipark
Pipark has no dependencies outside the Ruby Standard Library.
Pipark is tested on Raspbian and MacOS systems with Ruby 2.7 or newer. It may work on other platforms or with older versions of Ruby.
Prerequisites
There are no extra steps needed to use Pipark directly on your Raspberry Pi.
To access a Raspberry Pi via the network, Pipark uses SSH, and your Raspberry Pi needs to be set up for passwordless SSH access.
If you can enter ssh <ip address>
or ssh <hostname>
in a terminal to login to your Raspberry Pi, without the need to enter a password or anything else, you are all set.
See this guide for configuring passwordless SSH access.
Quick start
While logged in to your Raspberry Pi, find out its model:
this_pi = Pipark.localhost
=> Pipark::Host "localhost"
this_pi.model
=> "Raspberry Pi 3 Model B Plus Rev 1.3"
For a Raspberry Pi you can access via the network (using passwordless SSH):
that_pi = Pipark.host('thatpi.local') # use hostname or IP address
=> Pipark::Host "thatpi.local"
that_pi.model
=> "Raspberry Pi 3 Model A Plus Rev 1.0"
that_pi.cpu_temperature
=> 48850
License
See the included LICENSE.txt file.