Reading analogical input and output it as analogical

I am trying to read an analogical input at A0, multiplying it for 2.5 and output it at DAC0, but the program doesn´t work, can someone help me, please?

sketch_nov06b.ino (249 Bytes)

I tried to send the sketch but I failed so I wrote the sketch I made:

float r1,r2;
void setup( )
{
analogReadResolution(12);
analogWriteResolution(12).
}
void loop ( )
{
r1 = analogiRead(0);
r2= 2.5*r1;
analogWrite (DAC0,r2);
delay(300);
}

zeluiz:
I tried to send the sketch but I failed so I wrote the sketch I made:

float r1,r2;
void setup( )
{
analogReadResolution(12);
analogWriteResolution(12).
}
void loop ( )
{
r1 = analogiRead(0);
r2= 2.5*r1;
analogWrite (DAC0,r2);
delay(300);
}

Why do you use a delay?

zeluiz:
I am trying to read an analogical input at A0, multiplying it for 2.5 and output it at DAC0, but the program doesn´t work, can someone help me, please?

So what dosn't work? How areyou testing it?

First of all I use a delay because the writers of books use.
Second, If I inject 0.5V at A0 (r1) input, I expect to have at r2=0.52.5 = 1.25 so DAC0 would be 2.21.25/3.3+0.55 = 1.38V and it doesn´t happen!

I discovered why, it doesn´t work ; the board is burned...