The Great CRT to Oscilloscope Project!

Here's the code I was using for the arduino:

#include <TVout.h>
#include <fontALL.h>

TVout TV;

float val;
float mval;
int BUFFERSIZE=16;
float buffer[16];

int i;

void setup() {
  TV.begin(PAL,128,96);
  TV.select_font(font6x8);
  TV.clear_screen();
  TV.fill(BLACK);
}

void loop() {
  for(i=0;i<=BUFFERSIZE-1;i++){
    val=analogRead(0);
    mval=map(val,0,1024,0,48);
    val=map(val,0,1024,0,1000);
    buffer[i]=mval;
  }
  toTV(buffer);
  TV.set_cursor(2,88);
  TV.print((val/200));
  TV.print(" v | BFS: ");
  TV.print(BUFFERSIZE);
  BUFFERSIZE=analogRead(1);
  BUFFERSIZE=map(BUFFERSIZE,0,1024,0,(TV.vres()/2));
}

void toTV(float BUFFER[]){
  for(i=1;i<=BUFFERSIZE;i++){
    TV.set_pixel((TV.hres()-i),((TV.vres()/2)-BUFFER[i-1]),1);
    TV.set_pixel((TV.hres()-i),(TV.vres()/2),1);
  }
  TV.shift(BUFFERSIZE,LEFT);
}