Hi guys,
I need your help. I'm working on a project that has become rather big and uses a lot of pins. Now I want to implement a PC Speaker to send our some beep codes (always the same frequenzy beep with different delays between).
That is easy on my prototype with the tone() library. But not when I want to merge it in my full project because the TONE library makes some of my PINs unusable (timer, PWM)
I found this on arduino playground:
For Arduino Mega: (tested on Arduino Mega 2560)
timer 0 (controls pin 13, 4)
timer 1 (controls pin 12, 11)
timer 2 (controls pin 10, 9)
timer 3 (controls pin 5, 3, 2)
timer 4 (controls pin 8, 7, 6)
Pin8 - RF TX Module
Pin 9, 11, 12, 13 are used for 4 PWM signals (white, r,g,b)
10 is used for one wire temp sensor
0 - 7 is used for my touchscreen
14 - 15 ph sensor
16 - 17 ESP8266
18 - Ultrasonic Range Sensor
19 - RF RX Module
21, 21 SDA SCL for multiple stuff (RTC, breakout Expander,..)
So I can't sacrifice a single pin for the tone library. At least I think so.
So I need some code to let the speaker beep without any use of tone().
Any help is welcome
thank you