Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: oddson

Search: Search took 0.00 seconds.

  1. I hope you're feeling better! Have you tried...

    I hope you're feeling better!


    Have you tried both versions? The RAR version might me more usable in noisier electrical situations but I believe the noise you were getting was mostly from the mux...
  2. sorry to hear that... when you are feeling better...

    sorry to hear that... when you are feeling better I hope you're able to make use of this.
  3. Good to know but both the RAR version and my...

    Good to know but both the RAR version and my deadband version are very stable with very quick polling intervals.

    Here's my corrected dead-band hysteresis version which appears to be stable even if...
  4. I was at my local electronics shop and picked up...

    I was at my local electronics shop and picked up a CD74HC4067 MUX breakout.

    So I was able to try my code (RAR version) and, ...well I had it pretty close....

    Biggest problem was I forget to...
  5. Here is a version retaining the array of...

    Here is a version retaining the array of ResponsiveAnalogRead (RAR) objects (thanks to Christoph for sorting me out on this!).
    It's now very similar to the analog section of my example code and was...
  6. Hey thanks... didn't occur to me for some reason...

    Hey thanks... didn't occur to me for some reason to just declare the pins all the same.
  7. It occurs to me now that ResponsiveAnalogRead()...

    It occurs to me now that ResponsiveAnalogRead() may be incompatible with MUX'd signals as it cannot use the history of the signal to smooth the values without leaving it an inordinate amount of time...
  8. Oh... for stabilizing caps to do any good they...

    Oh... for stabilizing caps to do any good they have to be on each signal line BEFORE the MUX.

    Otherwise they just make things much worse by adding capacitance that will have to charge or...
  9. You really have to slow my code down to 200...

    You really have to slow my code down to 200 milliseconds or more and watch the serial messages print one-by-one and see if it is even working correctly with the MUX.

    It's likely easier to see the...
  10. Here's a line-by-line explanation... should help...

    Here's a line-by-line explanation... should help you troubleshoot now and extend the code later.


    Includes the library used to smooth analog values
    #include <ResponsiveAnalogRead.h>

    These...
  11. ...oh forgot the mux needs time to switch......

    ...oh forgot the mux needs time to switch... may need to add a timer to limit speed and the code above isn't set up to add this properly... it might work to just add delay but it will prevent the...
  12. yikes ...double posts... the second one has some...

    yikes ...double posts... the second one has some corrections already... there are bound to be more
  13. Well I found an 8 channel mux and some trimmers...

    Well I found an 8 channel mux and some trimmers that I'd started to set up on a proto-board but never got around to soldering.

    So I should be able mimic the same behavior with three channel...
  14. Duplicate of next post

    Duplicate of next post
  15. Have you thought about a 3.5 and skipping the...

    Have you thought about a 3.5 and skipping the MUX?

    The issue is the method .hasChanged won't work if there is only one pin so I'll have to track changes myself...

    Unless there are other major...
  16. Hmm... was a little optimistic... there is only 1...

    Hmm... was a little optimistic... there is only 1 analog pin now so the array has to be populated differently than I'm use too... it's still doable but it might take a few hours instead of 20 min.
  17. I'll see if I have a few minutes tonight to try...

    I'll see if I have a few minutes tonight to try my hand on what I think should work... but as I said I'm not likely to be able to test the MUX part... but if I can get it most of the way there you...
  18. You've taken on two non-trivial tasks at once... ...

    You've taken on two non-trivial tasks at once...

    Building an analog midi control from a potentiometer as a voltage divider AND multiplexing signals.

    Each on their own isn't too bad but...
  19. // only check the analog inputs 50 times per...

    // only check the analog inputs 50 times per second,
    // to prevent a flood of MIDI messages
    if (msec >= 20) {
    msec = 0;
    int n0 = analogRead(A0) / 16;

    This part is just reading the analog pin...
Results 1 to 19 of 19