well, I thought it could be done, but never the less i wanted to make sure because i have not got any Arduino board yet , I am very new to this domain in fact, thank you very much for your help another question please is suppose that I have a code that would light a led through the digitalWrite (pin#, High) & after it there is the tone code as mentioned in my post earlier, Led will stay on even when micro controller is carrying on the tone code? because I was surfing through the forum I noticed that every one is mentioning that the micro controller does not perform tasks in parallel but rather in high speed that the user would not notice the difference in many applications , so if the LED will stay on even during the Tone process is it because of this or because the fact that I told it to switch on the led by digitalWrite order and the pin stayed on the high state ?thank you all for all the help,
thank you Tim, to tell you the truth I am not a bit concerned about this as long as tasks that I assign the controller to do do not interfere or interrupt each other , so that is my only concern actually . i am working on a code were i need to initiate a relay while certain readings are obtained by an ultrasound sensor and start a sound for a certain period of time at the same time and then stopping it without interrupting the relay function at any time because the relay function could last for 1:30 hour or more,so do you think that i can just use the readDigital function to read the pin I assigned as writeDigital (pin, High)to activate the relay and link it in an If function to do the cut tones without affecting the relay function?thanks,
I believe a piezo only acts like a capacitor when "charged" in one direction (for example, with the tone library). The deflection of the disc is what generates the current. However, with toneAC it can't charge in this way as an alternating current is being sent. Therefore, the piezo is never charged and never acts like a capacitor. From my understanding of how a charge on a piezo works, supplying an alternating current eliminates the need for a resistor. But, maybe I'm mistaken.
hi every one i need to know something please , since we are using pin 11, & 12 for arduino Mega 2560 to out put the sound using tone(AC) and there is no GND connection how can i use a push pull transistor output B class amplifier stage to an 8 ohm speaker? how can i connect this out put to the common bases of the npn & pnp transistors?
Hello, I absolutely love toneAC and have been using it on pretty much all of my projects.Recently however, im trying to expand my project to the internet of things and picked up a Wemos D1 based on the ESP8266. (With inbuilt wifi)And unfortunately, im getting errors. I know its this library is built for the ATmega but I had to try My question is do you have any support for the ESP8266 or even the new and powerful ESP32?If not do you or anyone else have any suggestions for a tone library for the ESP boards?
Hi I want to connect two speakers (left speaker & right speaker), I know the specs says connect pin9 & 10 to speaker wires. The speakers will not play at the same time, only one or the other. I am using UNO, how to achieve 2 speakers connection? FYI, I know I can make a control switch circuit to switch between left and right speakers. But I'd rather not do that if there is a way to connect two separate speakers. Again only one speaker will be active at one time.Thanks in advance