Hardware:
The hardware is not very complexe if you're familiar with Raspberry Pi. The screen is a recycled one from office, a standard 19" DVI. The resolution is 1280x1024. It's rotated in portrait mode.
The printer is an Epson TM-T20II, connected to the Rpi with USB.
The camera module is a clone of the official Raspberry pi, with a slightly more luminous lens. Connected directly to the Rpi with the CSI port.
The buttons are connected between Rpi GPIO and 0V. And their LED to a small driver board and Rpi GPIO.
All power supplies (screen, Rpi 5V, printer) are connected to the same plug and a general switch.
Sofware:
The raspberry pi is running under the official Raspbian image.
The software is written in Java and uses two external libraries. One for GPIO - Pi4J and an other one for USB - usb4Java . The code source is on github : https://github.com/pierre-muth/selfpi
In addition, the native raspbian program raspividyuv is used to get the camera frames. The camera output is on top of everything and always visible.
Once the button is pressed, a frame is saved. The gray scale image is saved to a jpeg file, then data are dithered (Floyd–Steinberg) and sent to the printer.
Originally JavaFX was used to display a small interface. It was convenient as it worked without X. Now Oracle decided to not support anymore JavaFX on ARM. So It's back to Swing and LXDE should be started...
Hello,
I'm interested in this project, but I can't get it to work. I want to run it on a Raspberry Pi 3 with Debian OS.
My printer is a BTP-R580II, and it also works with ESC/POS.
I have the same camera module.
When I launch selfpi.jar, I get the following response:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/usb/UsbException
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:398)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:56)
Caused by: java.lang.ClassNotFoundException: javax.usb.UsbException
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 3 more
I've tried installing Apache, java-8-jre -jdk, java-11-jre -jdk, Eclipse IDE, and I've tried on both a 32-bit and a 64-bit OS, but I still have the same problem. Do you have a solution to help me?
Ps1: I'm not very familiar with programming, so I don't know how to open the .jar file.
Ps2: I'm not sure who this is for, but I also had a problem when running gradlew. I managed to solve it by changing the URL in /gradle/wrapper/gradle-wrapper.properties
distributionUrl=https://services.gradle.org/distributions/gradle-5.1.1-all.zip
Best regards,
Ulrick