The sound of a motor humming on a teensy 3.2

Status
Not open for further replies.
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:
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.
 
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.
 
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
 
Status
Not open for further replies.
Back
Top