Headerless running of multiple sketches

Greetings

I have been looking into Processing and it looks like it is very simple to do basic programming.

I can see that Processing is very similar to Arduino in that it has a setup and draw. Processing seems like it mainly geared at graphical projects. I am interested in running sketches on a headerless Raspberry Pi 0 running Stretch Lite, which does not have the GUI or keyboard / display at all. Although you can SSH into it, I do’t want to be having to type into a terminal at all if I don’t need to.
Also, I want it to be similar to the Arduino in that I can develop it on my laptop and then upload sketch the same way you would do with Arduino, except, I want to be able to have more than one Pi. Also, I want to be able to update my sketches on Pi without having to stop previous one. Can anyone let me know what I would need to do in Processing to make this work?

Thanks

1 Like

hi, using a similar editor
( arduino IDE started from the processing IDE long time ago )
to write sketches for arduino and processing

and having the same syntax JAVA // C++ style

might make it easy to use both,
but that is it with the comparison,
you do very different things with that 2 tools.


me using Raspberry PI 3B+ and a old windows PC
and also using Processing and Arduino IDE on both

and working many years headless only with RPI

  • SSH
  • VNC

i might understand some of your questions,
but

  • i not use RPI ZERO
  • i not use RASPBIAN LITE ( why you do that anyhow )

sorry:

but processing without GUI not makes any sense to me


now for the headless SSH Terminal start of processing
yes there is a command line thing

  • i use “bitvise SSH client” for
    windows to RPI
    < RPI IP >
    “pi” “mypassword”
    and get a terminal window and a SFT window

  • and via the terminal i can try to start processing
    but it will fail to open a window

pi@RPI3BP:~ processing-java --sketch=/home/pi/projects/Processing/sketchbook/KLL_work_RPI/grid_rect_auto --run Exception in thread "main" java.lang.ExceptionInInitializerError at processing.mode.java.runner.Runner.getSketchParams(Runner.java:478) at processing.mode.java.runner.Runner.launchVirtualMachine(Runner.java:209) at processing.mode.java.runner.Runner.launch(Runner.java:151) at processing.mode.java.Commander.<init>(Commander.java:283) at processing.mode.java.Commander.main(Commander.java:86) Caused by: java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it. at sun.awt.HeadlessToolkit.getMenuShortcutKeyMask(HeadlessToolkit.java:236) at processing.app.ui.Toolkit.<clinit>(Toolkit.java:94) ... 5 more pi@RPI3BP:~

while when i do same in a terminal window ( here via VNC )
it works


one aspect of your remote working could also be:
instead of writing code (text ) (on PC ) and copy it to RPI

you can edit the code via SSH terminal directly using like nano
or run a windows program like
notepad + +
editing a file on the RPI directly
( that would be perfect for you using RASPBIAN LITE via SSH )


this is on win7 PC edit a processing file on a RPI3B+ via NP++
NPPFTP mode ( plugin install ) using SFTP in profile
SNAG-0007

if you not use windows PC ( to the headless RPI’s )
can ignore that.

1 Like

First, thanks for your prompt reply.