Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3 version #13

Open
parsko41 opened this issue Jan 17, 2021 · 2 comments
Open

Python 3 version #13

parsko41 opened this issue Jan 17, 2021 · 2 comments

Comments

@parsko41
Copy link

parsko41 commented Jan 17, 2021

Hi all,

I've gone through and figured out how to get this going with Octoprint that has Python 3 installed. There are a few things that were deprecated when going from 2 to 3. One is the print statement, the other is the long statement. I went through the python script and updated those elements. I also included the changes suggested in the other issues, specifically addressing the pin allocation. This has changed from BCM to BOARD in my code. It seems maybe the powers that be have not converged with a standard? I'm not sure, I'm still getting into it this deep.

So, after getting it working, I'm curious if the behavior I am seeing makes sense.

  1. I'm not sure it does much outside of the settings menu. Is there a GUI front end? There are some javascript files in the repository. I write python code, and that stuff was easy to debug from the log file, but I am still mostly clueless with Java. I think there is a frontend because of what I can kind of decode from the java files that make the front end stuff.

  2. The spool weight doesn't do anything? I see the value, I can type into it to update it, but that's it. It's cool, as it saves what the value is, but I would have thought it would be tied into everything more, or am I not seeing something important?

This post helped:
https://github.com/dieki-n/Octoprint-Filament-Scale/issues/11#issuecomment-744584116

And this post helpd:
https://github.com/dieki-n/Octoprint-Filament-Scale/issues/12#issuecomment-728385562

Attached are my python 3 files. I've added a comment # UPDATED where I updated things.

hx711_python3.zip

I'd love to hear back from anyone else about if there is supposed to be more in the front end GUI on OctoPrint, and if what I did makes sense.

-Parsko

@Wayfinder624
Copy link

Thanks for the fixes. I can now see the plugin and calibrate. Though the "Filament Remaining: " in the State window toggles between NaNg and Sensor is not connected.

Is there a GUI front end? it shows in the STATE window for your printer.

@avr12345
Copy link

Thanky Parsko! My sensor is working perfectly. Is there a chance to connect more then one sensor? I have 4 sensors/spools in line with switchable RJ45 plugs. but its not that accurate because of the calibration. would be awesome to have 4 independent sensors connected

@parsko41 parsko41 mentioned this issue May 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants