Sunday, April 30, 2017

Marlin Firmware

     The Marlin firmware, for my Prusa I3 clone 3D-printer, has been a learning curve, for me, with programing a large project with arduino.
     I have put forth suggestions for fixes and new features like: DHT sensor support, case light. The case light was taken care of rather quickly, but the DHT sensor was left to me.
     The digital temp and humidity (DHT) sensor was quite the pain to incorporate due to not really knowing the layout and formatting of the Marlin firmware. I set out to get more familiar with it to get it working and I finally did.
     Next up, was to learn GitHub on how to submit new or changed code to the Marlin repository.
     Learning git was definately a challange. I made several mistakes when submitting code, and screwed up my repo several times. Not a bit deal, because the one thing I had down pat was how to make a copy of the Marlin repo. So, I could easily start over as many times as I needed to.
     So, I finally got the DHT code working and sumitted to the Marlin people. It is now up to them if they want include it in the firmware for everyone. But, now that it's on the repo, anyone can give it a try before "merging" it into the main stream.
     On that note, I noticed a submittal for adding RGB strip support. I got that mod and started testing it. I found that it didn't fully work as intended. So, I started tweaking and fixing. I got it to work flawlessly and submitted my changes to the original submitter of this code. I waited over two weeks and no responces. So, I created a new sumittal to Marlin, referencing the original work.
     A month or so passes and someone asked for RGBW support. I changed up some of the code to do so ans sumitted the changes.
     A week now goes by and someone else asked for addressable RGB strip support. Well, this took a little more work and was more worried that it would mess with Marlin's main operations due to timing issues. I was later directed to a fastled arduino library that made it work without too much of an issue. I then submitted those changes.
     The Marlin team took a look at the RGB strip code after some debate and wanted some changes done for complience and uniformity. These would just about require a full re-write of the RGB strip code. But, I did get it to the standards they wanted. They have stated that it would not likely be merged until the next release (1.2.0).
     Well, I then started on on some other parts, like making a menu system for the united bed leveling system (UBL), and a menu system for RGB light control.
     Both of these require a computer with a connection to the printer so the user can send manuall commands to operate these new features. I am trying to give the option to use these features using an LCD on the printer.
     I have these done now and have submitted the changes to Marlin.
     Other additions I've done is, display the type of leveling scheme in use and show "Generic" when power supply =0, on the "About Printer" screen in the LCD menu.
     Other than making and submitting code changes, there have been numberous people with issues thay I've tried to help. Some people give snotty replies, others give big praises. (That goes for every support position on this planet.)
     Again, this is getting fun for me. I am learning a whole lot more than just playing with lights on an arduino.