Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 2 FirstFirst 1 2
Results 26 to 31 of 31

Thread: The sound of a motor humming on a teensy 3.2

  1. #26
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    6,837
    It is only using 5: Diagnostics: 53.03 5

    So more isn't helpful.

    I had to stop overprinting the analog value to see that - like this and a check on the second one as well.
    Code:
     static int bpms = 0;
    
    //…
    
     if ( bpms != bangPeriodMilliseconds ) {
      bpms = bangPeriodMilliseconds;
      Serial.println(bangPeriodMilliseconds);
     }

  2. #27
    Thanks, I keep Learning!

    In term of optimisation, I can put audioMemory(5). i Don't know how the result change, do You?

    I need to explain why I want to use pulseIn: it is for a RC truck, my goal is to take the signal from a receiver, convert it into bpms.
    To achieve this: I need pulseIn or interrupts function. Why? The signal is in PWM format, like servo.write(1400)… In order to get those values i want to get the high level signal time.


    I have tried diferent interrupt pin, the result is always wrong.
    Last edited by Ced_Sylvain_&_cie; 08-29-2018 at 05:02 AM.

  3. #28
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    6,837
    I set it to (8) - just in case it grows. Sounded the same.

    Very Combustionesque sound to it, but it sounds like there is an exhaust leak the microphone is picking up

    It may be enabling the next thing will push memory usage up. As above only printing the Analog on change will allow that to be observed.

  4. #29
    I had to stop overprinting the analog value to see that - like this and a check on the second one as well.
    I corrected this bug in the previous code.

  5. #30
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    6,837
    Paul: I used my (long dormant) T_3.2 "Audio Tutorial Kit" for this sample and it fired right up to run this code - even had a POT in the right spot.

    NOTE: when I was first using that board I found the 'odd piece of scotch tape' on it - which I pulled off - then mounting the display it became apparent it was there to insulate the bare jumper wire, so I put a piece of kaptan tape back on.

  6. #31
    Quote Originally Posted by GremlinWrangler View Post

    The difficulty with this approach is that I do not think a teensy has the capability to produce a truly realistic engine effect from this mechanism since it needs tuned echos as described by audioengineer that if done from first principles would need more processing than a Teensy has.
    Nianiania ! 96%of RAM!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •