Rev 2440 Rev 2441
Line 15... Line 15...
15   15  
16   16  
17 void setup() 17 void setup()
18 { 18 {
19 Wire.begin(); // join i2c bus (address optional for master) 19 Wire.begin(); // join i2c bus (address optional for master)
20 // I2C pins PC4 - , PC5 - 20 // I2C pins PC4 - SDA , PC5 - SCL
21 // 21 //
22 pinMode(3, OUTPUT); // LED pro blikani, aby bylo videt, ze to neco dela 22 pinMode(3, OUTPUT); // LED pro blikani, aby bylo videt, ze to neco dela
23 Serial.begin(9600); // Zmerena intenzita osvetleni se bude vypisovat na seriovou linku 23 Serial.begin(9600); // Zmerena intenzita osvetleni se bude vypisovat na seriovou linku
24 Serial.println("LABduino luxmeter demo - (c) MLAB, kakl 2012"); 24 Serial.println("LABduino luxmeter demo - (c) MLAB.cz, kakl 2012");
25 } 25 }
26   26  
27 int data = 0; 27 int data = 0;
28 int light_sensor_setup; 28 int light_sensor_setup;
29   29  
30 void led_blink() 30 void led_blink()
31 { 31 {
32 digitalWrite(3, HIGH); // set the LED off 32 digitalWrite(3, HIGH); // set the LED on
33 delay(100); 33 delay(100);
34 digitalWrite(3, LOW); // set the LED on 34 digitalWrite(3, LOW); // set the LED off
35 delay(700); 35 delay(700);
36 } 36 }
37   37  
38   38  
39 int set_light_sensor(int mode) 39 int set_light_sensor(int mode)