Any plans for supporting ATtiny85 (Adafruit Trinket)?
Hi!I'm very new to Arduino and electronics. I'm building a capacitive touch morse keyer and I need to generate a 800 to 1200 Hz tone. I still don't know for sure if a sine wave is needed or a square wave is good enough to TX with a simple LPF.Does the NewTone() make a square wave output like tone()? I have found that NewTone(pin, freq) makes a little noise when it's ended with noNewTone(), but if I set a duration, the tone ends clean.I would like to code something like this example, but with a fixed duration. Do you have other library that I could use?Thanks in advance.
Hello Tim!Thanks for your quick answer.I have attached in the previous post an example from make magazine that creates a sine wave that never ends. I'm trying to merge your library and this example to generate a sine wave with a fixed duration. As I dont want to abuse of your time ¿Do you know or have something already made that I can use?For example teensy 3.2 could be an option.Again Thanks!H
Certainly not the author's fault, but FYI I attempted to use this as a drop-in replacement for tone in my application and caused a small fire... (I'm driving an inductor/oscillator pretty hard). Not sure if the duty cycle was higher, or it just kept the pin high for too long for some other reason.The only other library i'm using in this sketch is debounce, I don't think there are any timer conflicts there
You may be intersted in a problem I have encountered when using TimerFreeTone on a DUE;http://forum.arduino.cc/index.php?topic=442298.msg3044752#msg3044752I dont think the problem is with TimerFreeTone, but something unique to the DUE, whereby the timing (TimerFreeTone or bitbanging) gets messed up depending on where the code ends up in memory.
PLAYBACK of RAW wave dataIm playing around with your Newtone lib, and I want to playback a raw sound file (1 second) loaded in the flash mem of the nano.My problem is in what format do I have to provide the sound data that it plays correctly(The origin is a wav file which I converted to raw 8 bit data with the correct sample rate 2 kHz).In your comments of the toneAC thread I read, that it is easy to playback raw sound data.I would be glad if you or some else could give me a hint how to do it.(I can not use a media player because I want to modify the frequency during runtime)