-
Notifications
You must be signed in to change notification settings - Fork 81
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
MCP3008 #465
Comments
trying to display value/read from the MCP3008 but get serval errors. below is the code i am using. code i am trying to use. import RPi.GPIO as GPIO # Defines RPi.GPIO just as GPIO app = App() def update(): thread = Thread(target=update) app.display() |
Bug - It could just be your python code. Leave adding bug to the maintainers (been there myself, found the error of my ways) But you shouldn't be using thread, you should be using the app repeat/update parts. Here is an example of using sensor date with the SenseHAT I made some time back (no idea why I'm not on the list of people there, it was my pull request.). If using a RaspberryPi you can emulate the HAT to have a play (see line 7) https://github.com/lawsie/guizero/blob/master/examples/sensehat_read_data.py also a slider example and link it to the potentiometer |
There is some advice in the guizero docs about where you can get help - https://lawsie.github.io/guizero/gettinghelp/ I would suggest maybe the Raspberry Pi Forum. You may also want to include the errors you received. I dont think this is a bug with guizero, nor do I have the ability to test, but will leave the issue open until I do the next release. I did notice the code is using slider.set(pot.value * 100) To set the value of a Slider you should use the slider.value = pot.value * 100 |
Closing due to lack of activity. Feel free to reopen if you have additional information. |
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
System information:
pip show guizero
in a terminal/command prompt]Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: