Can you show me with the program with nodes?
Please!
Can you show me with the program with nodes?
Please!
If you double-click on the read-4067 node, it will open it in a new tab. It will basically look like what you have been posting, except there will be input & output pins defined. If it just has a not-implemented-in-xod node, then it is coded in C++, and you would have to double-click on that node to see the code.
That seems…not right. You are randomly triggering UPD, possibly while changing which port you are reading. DONE also gets triggered every time any of 4 digital-writes complete, and UPD for those is set to Loop.
The above problems might be side-stepped if you sync’d UPD with changes to IN0-15. The easiest way to do that would be to add a 2nd wire from count-to-n-NUM, run it to a new ‘pulse-on-change’ node, then chain that to ‘defer’ (to make sure writes complete before you UPD), then chain to read-4067-UPD.
I made some changes in the library, you would have to download it again
now it should update the ports only if the address doesn’t change
I downloaded and replaced the node. What should I have on “IN 0-15” ?
It dose not seem to give any input if I don’t ad something to input?
How would you do if you only want to use port 1, 3, and 14 for exampel and not have the rest open or floating?
Also how would I do if I want several “read-4067” nodes in the same patch for diferent multiplexers?
IN0-15 specifies which input/output you want to update with value from analog-read
If you don’t want to use a bunch of the ports, never ask to have them updated. Presumably, they will default to 0 on startup. The simplest way to code this for non-sequential ports is probably to use count-to-n to cycle through number of ports, and feed that to nth-input to get port #.
NOTE: count is 0-2, which is 3 values for the 3 ports you want to check.
If you want to connect multiple multiplexers, you will need to connect them to different Arduino ports, so IN & S0-3 will be different for each of the nodes referencing the multiplexers.
Looking at the library, I think I see why you are seeing flickering. When IN0-15 is changed, the new output is updated with last-read value from analog-read (i.e. the value for the previous channel), then gets updated again when pulse to UPD triggers a new analog-read. I think fixing this would require an UPD pin on dmplx-4067 that would get pulsed by analog-read-DONE so that output values don’t get updated with old values when you change to a new multiplexer channel.
There could be a reason for it, but it seems odd that read-4067 would send a DONE pulse after changing channels, but before that channel has been updated with currently-read value (pulsed when digital-write completes, before analog-read has been done to give new channel the correct value).
library cesars/4067@3.0.23 actualiced and working, test by @jacob-wiqvist
Big thank you Cesars!
You understood me and solved it.
Also a 56k ohm pull down resistor mad the unused ports stable low.
I connected it betwen analog signal from multiplexer and ground, did not need one resistor on each pot like I did first.
I will test if the values get better with that. But so far so good.
Next is wayting for parts.
Connect everything on a pcp test board.
Also need to multiplex switches.
Full video:
Thanks all for the help.
I was a little to fast to say it works.
Cesar check your “telegram”.
I am thinking ther is a problem with PWM sync?