# 3DPRCU

3D Printer Remote Control Unit based on ESP32

### Introduction
This is a open source demo for showing how to use ESP32 as your FDM 3D Printer controller using Web Interface. This demo also support ArOz Online System Home Dynamic IoT Communication Protocol (which will be open source later) and how to slice your stl file using CURACLOUD adapter (See {work in progress} for more information).

### Hardware
- 1GB or above Micro SD card
- ESP32CAM (Open souce hardware)
- Raspberry Pi with CURACLOUD installed (or any PC / VM that can run Debian + CuraEngine)

### CuraCloud
CuraCloud is an adapter made to adapt Cura to a PHP Server. What it does is that it support stl upload, stl slicing and return the gcode for further processing. Require CuraEngine package on Debian or CuraEngine.exe on Windows (To be supported)

To generate the slicing profile, you can use the CuraEngine dummy for Windows in order to get the slicing profile sent from the Cura UI to the CuraEngine. The process goes as follow.

1. Download CuraEngineDummy.exe inside Cura/CuraEngine Dummy/CuraEngine Dummuy/bin/ to a tmp location
2. Open Cura (The Software) Root location, find CuraEngine.exe, rename it as CuraEngine_original.exe 
3. Move the CuraEngine Dummy.exe to the Cura Root and rename it as CuraEngine.exe. Start Cura and slice something.
4. Wait for the file "passinvar.txt" to appear. (Cura UI might freeze during the process and this is normal)
5. Remove all newlines (aka \n) in the passinvar.txt. Move it to CuraCloud/templates/ folder. Modify the PHP to use the new template as pass in varaible or just replace the "Default.txt" with the new pass in variable without the need to change any PHP code
5. Replace the input and output filename with "{outputfilename}" and "{inputfilename}" inside the new template respectivly. ** REMEMBER TO KEEP THE ""

