/*
keyestudio Easy plug super kit 
Project 32
8*8 dot matrix-digital control
http://www.keyestudio.com
*/
#include <ks_Matrix.h>
Matrix myMatrix(A4,A5);
int K1=8;
int K2=9;
int x;
void setup() 
{
  myMatrix.begin(112);
  myMatrix.clear();
  pinMode(K1,INPUT);
  pinMode(K2,INPUT);
  myMatrix.drawCircle(3,3, 2, 1);
  myMatrix.writeDisplay();  // write the changes we just made to the display
}
void loop() 
{
  int K1_level=digitalRead(K1);
  int K2_level=digitalRead(K2);
  if(K1_level==0)
{  
  myMatrix.setTextSize(1);
  myMatrix.setTextWrap(false);  // we dont want text to wrap so it scrolls nicely
  myMatrix.setTextColor(1);
  myMatrix.setRotation(0);
  myMatrix.clear();
  myMatrix.setCursor(2,0);
  myMatrix.print("L");
  myMatrix.writeDisplay();
 }
  if(K2_level==0)
{ 
  myMatrix.setTextSize(1);
  myMatrix.setTextWrap(false);  // we dont want text to wrap so it scrolls nicely
  myMatrix.setTextColor(1);
  myMatrix.setRotation(0);
  myMatrix.clear();
  myMatrix.setCursor(2,0);
  myMatrix.print("R");
  myMatrix.writeDisplay(); 
}}
//********************************
