![Page 1: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/1.jpg)
Running the Processing environment on ARM SBCs
Lessons learned & what’s missing for having an Arduino equivalent on top of Linux
Gottfried Haider@mrgohai
![Page 2: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/2.jpg)
Processing
![Page 3: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/3.jpg)
Processing
“a flexible software sketchbook and a language for learning how to code within the context of the visual arts”
![Page 4: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/4.jpg)
Processing
“a flexible software sketchbook and a language for learning how to code within the context of the visual arts”
started 2001 by Casey Reas & Ben Fry at MIT Media Lab
![Page 5: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/5.jpg)
Processing
“a flexible software sketchbook and a language for learning how to code within the context of the visual arts”
started 2001 by Casey Reas & Ben Fry at MIT Media Lab
since developed by a group of programmers, educators, designers (LGPL/GPL)
![Page 6: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/6.jpg)
Processing
“a flexible software sketchbook and a language for learning how to code within the context of the visual arts”
started 2001 by Casey Reas & Ben Fry at MIT Media Lab
since developed by a group of programmers, educators, designers (LGPL/GPL)
based on Java (but also p5.js, Processing.py)
![Page 7: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/7.jpg)
Demo
![Page 8: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/8.jpg)
Processing
“a flexible software sketchbook and a language for learning how to code within the context of the visual arts”
started 2001 by Casey Reas & Ben Fry at MIT Media Lab
since developed by a group of programmers, educators, designers (LGPL/GPL)
based on Java (but also p5.js, Processing.py)
many resources, especially for education
![Page 9: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/9.jpg)
![Page 10: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/10.jpg)
Processing
“a flexible software sketchbook and a language for learning how to code within the context of the visual arts”
started 2001 by Casey Reas & Ben Fry at MIT Media Lab
since developed by a group of programmers, educators, designers (LGPL/GPL)
based on Java (but also p5.js, Processing.py)
many resources, especially for education
https://github.com/processing/
![Page 11: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/11.jpg)
Processing on the Raspberry Pi
![Page 12: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/12.jpg)
Processing on the Raspberry Pi
Google Summer of Code
![Page 13: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/13.jpg)
Processing on the Raspberry Pi
Google Summer of Code
Motivation:
- accessibiliy through price point (roughly equivalent to Arduino)
![Page 14: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/14.jpg)
Processing on the Raspberry Pi
Google Summer of Code
Motivation:
- accessibiliy through price point (roughly equivalent to Arduino)
- more powerful than AVR (FFT, computer vision, networking)
![Page 15: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/15.jpg)
Processing on the Raspberry Pi
Google Summer of Code
Motivation:
- accessibiliy through price point (roughly equivalent to Arduino)
- more powerful than AVR (FFT, computer vision, networking)
- prospect of a fully open 3D graphics stack (GLES2)
![Page 16: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/16.jpg)
Processing on the Raspberry Pi
Google Summer of Code
Motivation:
- accessibiliy through price point (roughly equivalent to Arduino)
- more powerful than AVR (FFT, computer vision, networking)
- prospect of a fully open 3D graphics stack (GLES2)
- access to large repositories of FLOSS software - great to introduce users to the benefits of working with existing communities (but: ARMv6)
![Page 17: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/17.jpg)
Processing on the Raspberry Pi
Google Summer of Code
Results:
- shipped in Processing 3.0.1 - try it out!
- 3D works with the current, closed-source GLES2 driver - thanks to JOGL & Xerxes Rånby
- also works with the in-progress DRM & Mesa Gallium driver by Eric Anholt (image @ http://sukzessiv.net /~gohai/vc4-buildbot/build/)
- can build on x86, deploy on ARMv6
- Hardware I/O library!
- should run on any ARMv6+ hard-float SBC (minus GLES2 upbringing)
![Page 18: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/18.jpg)
Processing on the Raspberry Pi
Hardware I/O
processing.io.* ArduinoUART x xGPIO x xI2C x xSPI x xPWM ~ xLED x
![Page 19: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/19.jpg)
Processing on the Raspberry Pi
Hardware I/O
processing.io.* ArduinoUART x xGPIO x xI2C x xSPI x xPWM ~ xLED x
Caveats (non hard-realtime OS, etc) - best effort
![Page 20: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/20.jpg)
Processing on the Raspberry Pi
Hardware I/O - what’s missing? (and why is this in the mobile & embedded devroom?!)
![Page 21: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/21.jpg)
Processing on the Raspberry Pi
Hardware I/O - what’s missing? (and why is this in the mobile & embedded devroom?!)
https://github.com/gohai/arduino-like-linux
Comments?
![Page 22: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/22.jpg)
Processing on the Raspberry Pi
Hardware I/O - Wishlist
- Software PWM
- Runtime pullup configuration
- Make PWM sysfs export show up in udev
- Race-free export of GPIO, PWM in sysfs?
- A way to get from PWM channel to GPIO number
![Page 23: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/23.jpg)
Processing on the Raspberry Pi
Hardware I/O - Wishlist
- Software PWM
kernel-land implementation using high-resolution timers
Bill Gatliff had a patch in 2010 - there are others e.g. i2c-gpio
wish: /sys/class/gpio/gpioN/software_pwm
- Runtime pullup configuration
- Make PWM sysfs export show up in udev
- Race-free export of GPIO, PWM in sysfs?
- A way to get from PWM channel to GPIO number
![Page 24: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/24.jpg)
Processing on the Raspberry Pi
Hardware I/O - Wishlist
- Software PWM
- Runtime pullup configuration
currently only possible through device tree overlays w/ pinconf
vs. digitalWrite() on INPUTs in Arduino
wish: /sys/class/gpio/gpioN/bias (behind config option?)
- Make PWM sysfs export show up in udev
- Race-free export of GPIO, PWM in sysfs?
- A way to get from PWM channel to GPIO number
![Page 25: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/25.jpg)
Processing on the Raspberry Pi
Hardware I/O - Wishlist
- Software PWM
- Runtime pullup configuration
- Make PWM sysfs export show up in udev
writing to /sys/class/pwm/.../export doesn’t trigger events for udev
(works w/ /sys/class/gpio/export)
hence currently root required
- Race-free export of GPIO, PWM in sysfs?
- A way to get from PWM channel to GPIO number
![Page 26: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/26.jpg)
Processing on the Raspberry Pi
Hardware I/O - Wishlist
- Software PWM
- Runtime pullup configuration
- Make PWM sysfs export show up in udev
- Race-free export of GPIO, PWM in sysfs?
exporting a GPIO pin needs to wait for udev to do its thing
currently: Thread.sleep(500)
perhaps: default owner & mode taken from export node? ideas?
- A way to get from PWM channel to GPIO number
![Page 27: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/27.jpg)
Processing on the Raspberry Pi
Hardware I/O - Wishlist
- Software PWM
- Runtime pullup configuration
- Make PWM sysfs export show up in udev
- Race-free export of GPIO, PWM in sysfs?
- A way to get from PWM channel to GPIO numbers
sysfs doesn’t tell you this atm
![Page 28: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/28.jpg)
Processing on the Raspberry Pi
Hardware I/O - Any help greatly appreciated :)
https://github.com/gohai/arduino-like-linux
Comments?
![Page 29: Running the Processing environment on ARM SBCs · PDF fileRunning the Processing environment on ARM SBCs ... to Arduino) - more powerful than AVR (FFT, ... kernel-land implementation](https://reader034.vdocument.in/reader034/viewer/2022051105/5a9e5da87f8b9aee4a8d9223/html5/thumbnails/29.jpg)
Thank you FOSDEM!
Gottfried Haider@mrgohai