So I want to use an Arduino Uno, that uses a serial communication by using an audio jack 3.5 mm for my tesla coil. My idea is to have a few buttons that can send the data to the Arduino and then it would send the data to the tesla coil through the audo jack and it would reproduce some sounds. Is it possible to do it? If yes, I have no idea how to write a code line for this.
This is how the tesla coil looks like, both real life and schematic.
C1: 1 µF 50 VL electrolytic
C2: 1 µF ceramic
R1: 10 kohm 1%
R2: 2 kohm 1%
R3: 2 kohm 1%
R4: 10 kohm 1%
Q1: IRF530
Q2: TIP41
LED1: LED 3mm red
LED2: LED 3mm red
J1: plug supply
J2: Jack stereo 3,5mm
Post an annotated schematic as to how you propose to wire this showing all power, grounds, and power sources. Links to each of the hardware items will probably be needed. This should convey most of the information we need to answer your question which is? As far as code you can research and find something similar or hire somebody to write it for you.
Are you trying to make a ESL (ElectroStatic Loudspeaker)? If so there are transformers designed to do this and will work much better than a tesla coil. Here is a link that will explain what I am saying.
OK.
I would use a sketch based on the tone Library, examples come with it.
As the circuit is capacitavley isolated then I would connect the digital pin with the tone output, and leave the ground on the audio jack unconnected. Then I would connect the ground of your coil's power supply to the ground of the Arduino.
You also could consider using an optical isolator to connect the tone pin to your coil's audio input for added safety.