user31105: I bought a very old oscilloscope and although it works, I have my doubts about refreshing the screen (the electron beam fades away very slowly or is not showing up consistently across the screen).
I tested a bit with digitalWrite and anlogWrite, but this only sends either 0 or 5V out. Is there a way to make a preferably sine or triangle wave of 0 to 5V or -5 to +5V... I guess the Arduino should be capable of it, but so far I only get 0V or 5V out, nothing in between.
According to lesson 8 I should get a variable voltage of 0-5V on a pin with analogWrite, but all I get is 0 or 5V.
For what I see:

PWM gives with analogWrite a pulse signal of 0V or 5V with a duty cycle.
non PWM pins give either 0V or 5V (analogWrite of 0-127 appr: 0V, >127: 5V).


user30005: a few ways:
1) you can generate a square wave of a known frequency to test the time base of the scope;
2) you can generate an analog signal to test for the vertical. that can be done via pwm or dds.

user4143: You can convert the PWM output of analogWrite() into an (approximate) analog voltage by adding a low-pass filter. That is, a resistor in series followed by a capacitor to ground.
The values to choose depend on the frequency response you want. 

RC Filter Calculator (second section).

For anything more complex or accurate you will need a DAC. I often use the MCP4822 SPI DAC chip.

31105: <p>I bought a very old oscilloscope and although it works, I have my doubts about refreshing the screen (the electron beam fades away very slowly or is not showing up consistently across the screen).</p>

<p>I tested a bit with <code>digitalWrite</code> and <code>anlogWrite</code>, but this only sends either 0 or 5V out. Is there a way to make a preferably sine or triangle wave of 0 to 5V or -5 to +5V... I guess the Arduino should be capable of it, but so far I only get 0V or 5V out, nothing in between.</p>

<p>According to <a href="http://www.toptechboy.com/arduino/lesson-8-writing-analog-voltages-in-arduino/" rel="nofollow noreferrer">lesson 8</a> I should get a variable voltage of 0-5V on a pin with <code>analogWrite</code>, but all I get is 0 or 5V.</p>

<p>For what I see:</p>

<ol>
<li>PWM gives with <code>analogWrite</code> a pulse signal of 0V or 5V with a duty cycle.</li>
<li>non PWM pins give either 0V or 5V (<code>analogWrite</code> of 0-127 appr: 0V, >127: 5V).</li>
</ol>
 30005: <p>a few ways:</p>

<p>1) you can generate a square wave of a known frequency to test the time base of the scope;</p>

<p>2) you can generate an analog signal to test for the vertical. that can be done via pwm or dds.</p>
 4143: <p>You can convert the PWM output of <code>analogWrite()</code> into an (approximate) analog voltage by adding a low-pass filter. That is, a resistor in series followed by a capacitor to ground.</p>

<p>The values to choose depend on the frequency response you want. </p>

<ul>
<li><a href="http://sim.okawa-denshi.jp/en/CRtool.php" rel="nofollow noreferrer">RC Filter Calculator</a> (second section).</li>
</ul>

<p>For anything more complex or accurate you will need a DAC. I often use the MCP4822 SPI DAC chip.</p>
