https://github.com/ruby-processing/picrate
A ruby-processing for the raspberry-pi (works on linux)
https://github.com/ruby-processing/picrate
creative-coding generative-art jruby processing raspberrypi ruby
Last synced: 3 months ago
JSON representation
A ruby-processing for the raspberry-pi (works on linux)
- Host: GitHub
- URL: https://github.com/ruby-processing/picrate
- Owner: ruby-processing
- License: lgpl-3.0
- Created: 2018-05-05T05:49:49.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-27T22:21:20.000Z (almost 3 years ago)
- Last Synced: 2025-01-31T14:22:14.185Z (12 months ago)
- Topics: creative-coding, generative-art, jruby, processing, raspberrypi, ruby
- Language: Java
- Homepage: https://ruby-processing.github.io/PiCrate/
- Size: 8.99 MB
- Stars: 5
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
__C6H3N3O7__ [](https://badge.fury.io/rb/picrate)
# PiCrate
Version for `Raspberry Pi OS` on raspberryPI 3B+ works with jdk17. That also works on 64 bit `ManjaroArm` distro on RaspberryPI4. Create processing sketches in ruby on raspberry-pi and linux (this project is a parallel development of [propane][propane] targetting the raspberry-pi, but will initially be developed on a regular linux box). The aim is to produce a gem installable app that can be run with jruby, with minimal dependencies. Drop the `C` and you get pirate, or and an `e` and get `PiCreate`, a happy coincidence?
### To install from rubygems ###
```bash
jgem install picrate
```
### To Build and Test ###
Clone main branch:-
Requires java to build (and [jogl-2.4.0-rc jars][jogl_jars]), but uses a maven wrapper so you don't need to install maven. Suggest build/test on regular linux box, but is designed for use on both RaspberryPI 3B+ and RaspberryPI4. Needs installed jruby to test/run.
```bash
cd PiCrate # or whatever you call it
rake # assumes an installed version of vanilla processing
jgem install picrate-2.5.2-java.gem
```
To create a template sketch:-
```bash
picrate -c my_sketch 200 200
```
Edit sketch ([vim][vim] is a good choice, but we recommend [geany][geany]) :-
```ruby
#!/usr/bin/env jruby
# frozen_string_literal: false
require 'picrate'
class MySketch < Processing::App
def settings
size 200, 200
end
def setup
sketch_title 'My Sketch'
end
def draw
background 0
fill 0, 0, 200
ellipse 100, 100, 90, 70
end
end
MySketch.new
```
### Run Sketch ###
```bash
jruby --dev my_sketch.rb # --dev flag speeds start-up
```
[buster]:https://gist.github.com/monkstone/6ae9840d7b7008c177b4a9f589d14ec6
[propane]:https://ruby-processing.github.io/propane/
[vim]:https://github.com/ruby-processing/PiCrate/blob/master/docs/_editors/vim.md
[geany]:https://github.com/ruby-processing/PiCrate/blob/master/docs/_editors/geany.md
[jogl_jars]:https://jogamp.org/deployment/archive/rc/v2.4.0-rc-20210111/jar/