background image

 

VMA325 

V. 01 – 19/03/2018 

©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); 

Содержание VMA325

Страница 1: ...VMA325 COLOR SENSOR TCS3200 MODULE USER MANUAL ...

Страница 2: ...tions of the device before actually using it All modifications of the device are forbidden for safety reasons Damage caused by user modifications to the device is not covered by the warranty Only use the device for its intended purpose Using the device in an unauthorised way will void the warranty Damage caused by disregard of certain guidelines in this manual is not covered by the warranty and th...

Страница 3: ...output frequency scaling selection input S1 output frequency scaling selection input S2 photodiode type selection input S3 photodiode type selection input V 5 VDC power supply G ground OE output enable must be connected to G ground LED LED enable input low ON 7 Example Connection V 5V GND GND S0 D3 S1 D4 S2 D5 S3 D6 OUT D2 LED D7 OE GND Connect your VMA325 to your microcontroller VMA100 as above D...

Страница 4: ...S3 3 define OUT 2 define LED 7 int g_count 0 count the frequency int g_array 3 store the RGB value int g_flag 0 filter of RGB queue float g_SF 3 save the RGB Scale factor Init TSC230 and setting Frequency void TSC_Init pinMode S0 OUTPUT pinMode S1 OUTPUT pinMode S2 OUTPUT pinMode S3 OUTPUT pinMode OUT INPUT pinMode LED OUTPUT digitalWrite S0 LOW OUTPUT FREQUENCY SCALING 2 digitalWrite S1 HIGH digi...

Страница 5: ...cd 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 g_flag TS...

Страница 6: ...al println g_array i g_SF 0 255 0 g_array 0 R Scale factor g_SF 1 255 0 g_array 1 G Scale factor g_SF 2 255 0 g_array 2 B Scale factor Serial println g_SF 0 Serial println g_SF 1 Serial println g_SF 2 for int i 0 i 3 i Serial println int g_array i g_SF i void loop g_flag 0 for int i 0 i 3 i Serial println int g_array i g_SF i lcd setCursor 0 1 lcd print int g_array i g_SF i lcd setCursor 0 1 lcd p...

Страница 7: ... or injury resulting from incorrect use of this device For more info concerning this product and the latest version of this manual please visit our website www velleman eu The information in this manual is subject to change without prior notice COPYRIGHT NOTICE The copyright to this manual is owned by Velleman nv All worldwide rights reserved No part of this manual may be copied reproduced transla...

Страница 8: ...n shocks falls dust dirt humidity and by the article as well as its contents e g data loss compensation for loss of profits consumable goods parts or accessories that are subject to an aging process during normal use such as batteries rechargeable non rechargeable built in or replaceable lamps rubber parts drive belts unlimited list flaws resulting from fire water damage lightning accident natural...

Отзывы: