Is possible to use this


using this user interface


Interesting… Where did you find that interface? You must be pointed to a very old version of Photonic3D that we still package with Photonic3D. I would be very surprised if that interface still worked. Is there a reason you want to use that interface?


i’m trying to create a lite version of photonic3d that drive lcd and stepper motor with the minimal java code and GUI.
remove all unused files that needed for other printer.

help appreciated


So, this isn’t well tested, but I’ve added another printer driver called “Generic Javascript”. This allows you to execute javascript on the pi whenever a template is required. In your case you’ll want to quick code up something like this:

I’ve added the Javascript for the template header to get you started. Just install the printer called: Direct stepper control

When you are ready to test, just hit the test button next to any template and it will execute the javascript without even having to save the printer to test.

Here’s the code I put in the header:

var gpioFactoryClass = Java.type("");
var gpio = gpioFactoryClass.instance();

var pins = [gpio.provisionDigitalOutputPin(RaspiPin.GPIO_00, PinState.LOW),
	gpio.provisionDigitalOutputPin(RaspiPin.GPIO_01, PinState.LOW),
	gpio.provisionDigitalOutputPin(RaspiPin.GPIO_02, PinState.LOW),
	gpio.provisionDigitalOutputPin(RaspiPin.GPIO_03, PinState.LOW)];

var single_step_sequence =[parseInt('0001', 2),
	parseInt('0010', 2),
	parseInt('0100', 2),
	parseInt('1000', 2)], "byte[]");

var motor = new com.pi4j.component.motor.impl.GpioStepperMotorComponent(pins);

Connect Photonic3D to lasershark