Forum Rule: Always post complete source code & details to reproduce any issue!
-
Senior Member+
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);
}
-
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.
-
Senior Member+
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.
-
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.
-
Senior Member+
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.
-

Originally Posted by
GremlinWrangler
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!
-
Hello dear members,
My task is almost finished, I have an algorithm that reproduce the sound of a motor. But it seems the process is locking a part of the electronics inside the teensy.
In fact I can't use the function pulse in wich is a king of interuption.
Is there is a way around the problem?
Thanks,
Cedric
-
Must likely cause is running out of memory and getting into a stack/heap collision with the non audio code or triggering something that exceeds the assigned audio memory.
https://www.pjrc.com/teensy/td_libs_...onnection.html
If you have assigned arrays somewhere in the process over or under shooting there will also tend to crash things so check for things of that nature.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules