Hello, I'm building a solar printer, which is basically a laser cutter that uses a magnifying glass pointed at the sun to burn images into wood. My hardware is essentially a 3d-printer platform with a print-bed that moves in the XY directions (controlled with steppers and GRBL) while the magnifying glass stays in a fixed position (with the help of a solar tracker). My goal is to use data from an image file to generate code that will move & pause the print bed and allow the sun to burn the image into wood.
I know there are lots of resources for converting images to Gcode. But these all assume the image is line-based vector art. But suppose I want to print a bitmap or etch a photograph... how would I go about doing it?
My thought is that I can use Java to open an image file, access the pixel data for a given coordinate, and use that to tell my steppers where to go and how long to rest there until my wood is burned to the proper shade.
It gets a little more complicated though. Typically, a gcode program (which is just a list of X and Y connect-the-dot type coordinates) is loaded into the GRBL controller software on a PC, which feeds coordinate commands over a USB COM port to the stepper motor controller once the previous command has finished executing. Basically, set it and forget it. However, because my power source is irregular (Sun, clouds, atmosphere, etc.), I need to be able to compensate for variable lighting conditions based on real-time sensor input and be able to adjust commands thereafter to ensure a consistent print. So if a cloud passes by, for instance, the computer knows to check for the right about of "burn" in that pixel location before telling the print bed to move to the next coordinate.
I've never programmed in Java before, and this is largely meant to be a learning experience in addition to the project deliverables. Any thoughts or advice would be greatly appreciated! TIA
Until we work out which language you will be using, I shall move you to our General Computing forum. We might move you to another forum later.
I suggest you start by writing out some algorithms that you want to implement. The algorithms should look exactly the same irrespective of implementation language. Do yvau have any instructions for connecting to the hardware interfaces in Java®?