-
Notifications
You must be signed in to change notification settings - Fork 19
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
digital input...issue after reading 8th input #2
Comments
ive wrote some additional code which includes output to LEDS so you can visualize the problem a bit better and recorded a video...seems to be inputs 0,1 and 2 that are having this issue. heres the new code
and heres the video |
Hi @snoophuman, thank you for the feedback (I really like the last experiment you put together). I cannot test the code myself at the moment, so I gonna have to ask for your help. I made a little change that I think might be causing the problem. Please give the unstable/en branch a try. |
I gave it a shot, no luck. When buttons 8-15 are pressed, nothing at all is printed. button 0: 1, 8, 12, 1, 8, 12, 1, 8, 12, 1, 8, 12, 1, 8, 12, here is an additional video https://www.youtube.com/watch?v=3HR-CvC_5Os&feature=youtu.be i dont know much about binary and shift registers but heres a copy of the datasheet...i noticed theres a table in there that has a lot of 1s and 0s...maybe that has something to do with it heres a link to the product page as well just in case im using the wrong hardware or somethin |
I cannot associate what's happening in your circuit with something in the code. I'd like to say I tested everything when I created the library, but I cannot remember at this point. I'm gonna have to test this myself to see if there is anything wrong with the library. But this is not going to happen soon. In the meantime, if you are willing to continue testing, you can try a few more things (with the original code):
|
good idea, ill try those options out! and let ya know how it goes |
PROBLEM SOLVED!It turns because I was using a Teensy (4.1 in this case) it caused an unexpected problem... HERE is a link to his post if you would like to read in more detail simply changing this bit of code in MUX74HC4067.cpp
to this
fixes everything. I also simplified my code a little bit. Here is the final version of my code.
Lastly - here is a video of things in action: YOUTUBE Huge thank you to you @nlamprian and another huge thanks to @PaulStoffregen ! You both rock! |
Awesome news 👍 Please give my branch (along with your fix) another shot if you will. It's something that should be fixed regardless. And feel free to create a pull request with your fix. |
Hey there! greatly appreciate your work. It seems to work flawlessly when reading analog input from 16 potentiometers annnd writing to 16 LEDS. Aw yeee!
I was trying out using it for reading digital input and it seems to work pretty well for buttons I have wired up to 0-7 on the multiplexer but after that for some reason if I have buttons wired up for pins 8-16 things get weird.
Heres a copy of the code I've cobbled together.
Note: I have wired up things as such:
en-> pin 24
s0-> pin 12
s1-> pin 11
s2-> pin 10
s3-> pin 19
sig -> pin 8
Each button i have wired up has a leg attached to a resistor to gnd.
if i press my button 0 it will print to serial both 0 and 8 for some reason...
The text was updated successfully, but these errors were encountered: