MPCNC BTT TouchScreenFirmware for TFT35 2.0

So… MORE progress last night adding custom buttons!! I got the other 2 things done that I wanted. “Z Probe” and a “Drop to Z0” custom buttons on the HOME menu. I also dinked around with some PhotoShopping of buttons… the first buttons I just took existing ones and made them from those. Yeah, I know the Z probe one is really just the BLtouch one modified, but it was close to what I pictured! :slight_smile: Maybe one of these days I’ll re-do ALL the buttons as a new theme (which seems to be lacking - some guy does some real nice ones but charges to join his “patronage” site!) I made new X Y Z Zero buttons, with targets behind the letters. I was thinking of like a gun-scope cross-hair sorta thing, but landed on that.

Now let’s see if I can attach a picture:

Wow - this forum engine is NICE! I just cut-n-pasted it! The picture is a little washed out. But the icons have a light background and so I think I’ll darken them up a little. The white doesn’t quite contrast enough. And I got rid of the 2 other buttons that were there before, as they didn’t work for me. Eventually I’ll learn how to probe the corners, too, and add buttons.

OH - and I only did tft35. I imagine anyone could just enlarge the picture if I were to ever provide them…

And yes they work as designed!!! Woohoooo… I’m a beast now.

EDIT added 3/8/2021

So… I’m not allowed 3 consecutive replies in a row! LMAO - really? I guess for spammers or something… OK…

Hmmm… no takers/comments on that Z Probe mod? No one else looking for this? Must mean I’m doing something else wrong, like the Z home button that was there before should have been working for me?

4 Likes

Dear Dennis, let me answer to you, although I’m also a newbie to the MPCNC, programming and specifically to this forum)
You have done a really nice menu and much respect to you that you have done that all on your own. Appreciate if you continue your development and also if you share your experience here and/or on your github page, where the original firmware is “traditionally” being customised and updated. Hope, I don’t breach against any forum rules for this piece of advise…
But it seems you have not read this forum thread at all. Currently there already exists a V1 branch of BTT firmare on github, as well as many other branches and sub-branches designed specifically for the MPCNC - some examples you can find through the links above - which work just fine (at least with my MPCNC, leave alone some minor issues discussed above).
The probe function has also long been implemented, as well as many other really great functions used specifically for milling and laser cutting, including the ability to write and save custom commands to the TFT menu.
For I’m a complete 0 in programming, I cannot tell, how to add custom menus or even edit the existing ones. I also could not find any step-by-step manual how to do that, other than edit the main config files or change the icons, which is pretty obvious anyhow. Also, since the BTT Firmware is always updating and some latest changes have been rather drastical, it is hard and time consuming to keep up to date all the changes that the esteemed members of this forum have already done up until now, which is also completely understandable.
So, you are very welcome to write your own code anew and maybe even better - take a look at the existing TFT modifications and make the required amendments for your own needs, because it’s already huge work of our friends from all over the world worth taking into consideration.

Thanks Valery. I guess I was unsuccessful in finding the branches… and I’m a total newb to GIThub so that’s probably why. I did try whatever I could find for my Lowrider2, but the buttons did not function the way I assumed they should. If someone can point me DIRECTLY to the branch that does what I may have re-invented, I would be greatly appreciative. I have also added custom commands which I was able to make work properly. I wanted buttons. In the menus. And so I made those, too.

Thanks for the advice, though. I’ll keep hunting. Or I’ll rewrite and document exactly what I need to, in case of updates.

This works for me, with just a little play with initial settings: https://github.com/V1EngineeringInc/BIGTREETECH-TouchScreenFirmware

Hello,

I’ve done translations in french for the project but I can’t find the way to push them. Can I send them by email to someone that could integate them in @Jeffeb3 's Github? ‘https://github.com/V1EngineeringInc/BIGTREETECH-TouchScreenFirmware.git/

That would be great.

berdeter at gmail dot com

1 Like

I’ve also managed to add giant steps for moves (10cm in XY and 3cm in Z).

For that one I really need the right to do a pull request if I want to share because it touches many files.

I think it is a very convenient solution for people that have a large machine (mine has a usable area of 1m in X…)

If not possible to do pull requests I’ll keep it for me. Such a shame. @jeffeb3 can you help ?

Bernard

It is definitely possible to do a pull request. You need to fork the repo in github and then push your branch there. Then you can make a pull request (and github should add a nice shiny button at the top to make it easy).

I am not ready to have more than one config for the screen and 100mm seems like a large jump. You should be able to use the knob to move farther more quickly.

Just wanted to follow up on this and see if it is working well with no issues. I’m interested in trying this for the z probe on my machine.

I’m having trouble getting the actual HOW this is done. For instance–say I wanted to add a “probe button” and I have a TFT24 screen. I get that I need to use the right bin file and create a 70x70 icon for a “probe” command. But what I’m having a hard time figuring out is how to program the screen so it knows that when I press the “probe” button it executes the right command. Also, where is the screen layout information? Like which icon goes where on the screen and how to add more?

This thread is full of others great contributions–but it’s more like “look what I did” versus "here’s how I did it.

If anyone can point me to a tutorial to get from a stock screen to Gabriele’s that would be great. I’m currently using that screen and it indeed works well but I would just love to know how he got there…

It isn’t easy and I don’t think a tutorial would be worth making.

The code isn’t built in a way to make it simple to edit. It is built to reliably make the functions they want, on lots of hardware and languages.

So it ends up being pretty complicated to do something like add a button. It is somewhat easier by the fact that any single person only has to edit it to support one language and one screen size. So a lot of people have made enough edits to make it work for them, but not put in the (sometimes 10x more) effort for making it useful to merge back into the main project.

To work on a project like this, you need a little coding knowledge. You need to be able to compile the code. You need to compile after each small change. You need to be able to read the error messages and warnings and figure out the correct syntax.

I wouldn’t start with this firmware though. The BTT version has incorporated my changes for extruders=0 and hotends=0 in the config.ini

To start (after you have built and flashed the BTT version). Don’t add a button, just replace one. You mentioned probe, try finding the code for the home Z button and replace the picture, title, and resulting gcode with the probe function. Compile at each small change and test to make sure it works. Once you see all the parts needed to make that probe button, you can try to add in another button. You will need to be good at searching, because that functionality is spread across a lot of files.

In the case of the Home Z, take a look at the Home.c file:

The homeItems list has the icons and title for each button. Then there is a switch based on which button gets pressed. The body of those case statements determines what happens when you press a button. storeCmd looks like it is responsible for sending gcode over the serial port.

Testing is also pretty involved. You need to have a pretty good understanding of your CNC firmware to know what is happening. I ended up making a cable to connect the screen to my computer and I had a python script acting like Marlin so I could read exactly what was being sent/received. Hopefully, you won’t need that.

1 Like

Wow-thanks for that great response! My first thought was replacing the “fan” button with a probe button so maybe I’ll start there.

Again, thanks for the considered and detailed reply!

1 Like

hi loki
im trying to install this firmware to a tft e3 v3 but it dosent work any ideas

SKR Pro - V1 Engineering Documentation, if this does not work start a new thread and give us more details of what is going wrong.

I has been 2 years since users noticed this error. So anyone figured out how to fix this faulty behaviour? Obviously it would be nice if the TFT35 would prompt the string of M0

Went to tweak my TFT35 settings after 2 years, and Jeff’s “ststm32@9.0.0” tip saved the day! Thank you Jeff!!!