 SmoothAnalogInput smp8;
 SmoothAnalogInput smp7;
 
-int samples;
+int samples, i;
 
 void setup() {
   Serial.begin(57600);
+
+  oled.begin();
+  oled.clear(ALL);  // Clear the display's memory (gets rid of artifacts)
+  oled.display();   
 
   pinMode(A9, INPUT);
   pinMode(A8, INPUT);

#include <DmxSimple.h>

#define smooth 1

#include "SmoothAnalogInput.h"


}

void loop() {
int width = 24;
int height = 64;
  int sm7 = smp7.read();
  int sm8 = smp8.read();
  int sm9 = smp9.read();
  //sm8 = map(sm8, 0, 50, 0, 64);
  //oled.rectFill(0,0,64,i++);
 // if(i>63) i=0;
 oled.rectFill(0, 0, width, constrain(sm8, 0, 50));
 
  oled.display(); oled.clear(PAGE);
/*
  Serial.print(sm7);
  Serial.print(" ");
  Serial.print(sm8);
  Serial.print(" ");
  Serial.print(sm9);
  Serial.print(" ");
  Serial.print(analogRead(A7));
  Serial.print(" ");
  Serial.print(analogRead(A8));
  Serial.print(" ");
  Serial.print(analogRead(A9));
  Serial.println();
*/
  delay(10);
  //DmxSimple.write(1, brightness);
}
