So I'm fairly new to the Raspberry Pi, never really dealt with Linux too much before, or a CLI operating system outside of like a Cisco enterprise switch or a few things when Windows gets cranky. I'm pretty fluent in basic code, ladder logic, C++, arduino's whatever-it-is, a TINY bit of Java, and whatever you call the mish-mash between C and assembly I used to program some PIC controllers. Anyway I'm fairly confident in learning some new things and designing something from scratch, but the Pi has me a little confused about a few things.
So ever since I was in the local vocational school I've had a thing for robotics and specifically CNC machinery, as using CNC, one can quickly and easily make MANY more things. So for awhile I've been wanting a CNC machine myself. So, being the enterprising and resourceful individual I like to tell myself I am I began listing parts and thinking of some designs for a machine. 3D printing is a obviously a hot new thing and having acess to a Stratasys printer at school was amazing, since gradating I miss having it for quick design for some machine/robot parts. So now I have a big box o' parts.
Now here's where things get a little tricky. The electronics out there for these custom or open-source printers. I have a RAMPS board with the smart controller that I intend to use for awhile, but ultimately a control systems upgrade will be necessary due to several features I have on my Printer, like a solenoid-latched door, key-switch controls lockout, lights, webcam streaming, etc. Here's where the Pi comes in. Now some things like Octoprint or Astroprint are cool, but they're specifically for 3D printing (I have an interchangeable head for PCB engraving, or even a laser at some point, dunno) and adding features they don't explicitly have built in is pretty daunting.
Obviously to work in real-time and achieve machine synchronization and accuracy, a "real-time" operating system must be used. So I'm thinking microCONTROLLER for that part, Arduino or PIC based since I have those resources. I may even stick to a RAMPS-style build for firmware compatibility at the beginning. The thing is, what these types of boards don't offer is a decent control interface ON the machine. Encoder/button combo with the LCD menus just isn't thrilling me all that much. Which got me looking at this touchscreen I bought on a whim with my Pi 2 that I never really touched. I realize this is a very extensive project that will most likely take a long long time.
I have a Pi 2 with the official 7" touchscreen and a Pi camera, compatible WiFi card, and portable m+kb combo thing. I also have a Windows-based computer if i need it for development or whatever. The goal of the project is to be an HMI and possibly G-Code interpreter for the microcontroller actually connected directly to the end hardware of a multipurpose CNC/3D printer. I'd like the Pi to have XYZ and extruder control buttons, switches for the lighting, door latch, or other outputs as well as status of things like the temperatures, prints, time to complete parts, weight of plastic remaining on spool, i think you get it, as well as the ability to start and stop the G-Code jobs of the printer, with maybe a web-facing interface to upload jobs from my CAD/slicing PC. I'm thinking of using Python as the language to write in as a learning exercise in Python, which i have very little experience in. If this is an unreasonable thought, please let me know.
So my questions:
The HMI GUI. I don't really need the overhead of running a whole desktop environment like Raspbian has shipped. Is there a way I can boot to CLI, autorun script, then my Python program take over and output its GUI? I don't require all the little bits the desktop environment has, because I'll only be running the one program.
Then, how do I actually program the GUI? I understand there are "toolkits" that allow you to make things like check boxes and icons and whatnot that you call within Python. Does this work even if I don't have the "desktop" environment? Does anyone have any recommendations?
Performance. Can I nuke features/processes/software from the Raspbian install (or build a bare-bones OS and install what I want) to maximize functionality without having a bunch of software I'll never use on there?
Webcam. How does one program to stream the webcam, or take pictures with it? I understand the drivers are available or included in Raspbian, but how would one program to encode and send or save that?
I think that'll do for starters. Thanks for reading, and in advance for any suggestions or help.




