VMA325
V. 01 – 19/03/2018
5
©Velleman nv
if(Level02 != 0)
Level02 = HIGH;
digitalWrite(S2, Level01);
digitalWrite(S3, Level02);
}
void TSC_Count()
{
g+ ;
}
void TSC_Callback()
{
switch(g_flag)
{
case 0:
Serial.println("->WB Start");
TSC_WB(LOW, LOW);
break;
case 1:
Serial.print("->Frequency R=");
//lcd.setCursor(0,0);
//lcd.print("Start");
Serial.println(g_count);
g_array[0] = g_count;
TSC_WB(HIGH, HIGH);
break;
case 2:
Serial.print("->Frequency G=");
Serial.println(g_count);
g_array[1] = g_count;
TSC_WB(LOW, HIGH);
break;
case 3:
Serial.print("->Frequency B=");
Serial.println(g_count);
Serial.println("->WB End");
g_array[2] = g_count;
TSC_WB(HIGH, LOW);
break;
default:
g_count = 0;
break;
}
}
void TSC_WB(int Level0, int Level1) //White Balance
{
g_count = 0;
+;
TSC_FilterColor(Level0, Level1);
Timer1.setPeriod(1000000);