RESET : Jalur low ini digunakan untuk me-reset menghidupkan ulang
L15
43. TCCR1A = 0; 44. TCCR1B = 0;
45. 46. Set timer1_counter to the correct value for our interrupt interval
47. timer1_counter = 64911; preload timer 65536-16MHz256100Hz 48. timer1_counter = 64286; preload timer 65536-16MHz25650Hz
49. timer1_counter = 34286; preload timer 65536-16MHz2562Hz 50.
51. TCNT1 = timer1_counter; preload timer 52. TCCR1B |= 1 CS12; 256 prescaler
53. TIMSK1 |= 1 TOIE1; enable timer overflow interrupt 54. interrupts; enable all interrupts
55. pinModeA0, INPUT; input analaog sensor kelembapan 56. pinMode41, INPUT; Button StartStop
57. pinMode42, INPUT; Data Yang terkirim 58. pinMode43, INPUT; Button output sensor
59. pinMode44, INPUT; Button Output Kendali 60. pinMode22, OUTPUT; kendali suhu
61. pinMode23, OUTPUT; kendali kelembapan udara 62. pinMode24, OUTPUT; kendali kelembapan tanah
63. pinMode25, OUTPUT; LED output Dingin 64. pinMode26, OUTPUT; LED output Normal
65. pinMode27, OUTPUT; LED output Panas 66. pinMode29, OUTPUT; LED output Kering udara
67. pinMode30, OUTPUT; LED output Lembab udara 68. pinMode31, OUTPUT; LED output Basah udara
69. pinMode32, OUTPUT; LED output Kering tanah 70. pinMode33, OUTPUT; LED output Lembab tanah
71. pinMode34, OUTPUT; LED output Basah tanah1 72. ifdef AVR
73. Wire.begin; 74. else
75. Wire1.begin; Shield I2C pins connect to alt I2C bus on Arduino Due PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI
L16
76. endif 77. rtc.begin;
78. 79. if rtc.isrunning {
80. lcd.setCursor 0, 0; 81. lcd.printRTC GAGAL;
82. following line sets the RTC to the date time this sketch was compiled 83. rtc.adjustDateTimeF__DATE__, F__TIME__;
84. This line sets the RTC with an explicit date time, for example to set 85. January 21, 2014 at 3am you would call:
86. rtc.adjustDateTime2016, 3, 11, 21, 52, 30; 87. }
88. pinModeanalogin, INPUT; 89. Serial.print inisialisasi SD..;
90. while SD.begin53 { 91. lcd.setCursor 0, 0;
92. lcd.printSD Card Error; 93. }
94. lcd.setCursor 0, 0; 95. lcd.printSD Card Ready;
96. delay 1000; 97. lcd.clear;
98. } 99. ISRTIMER1_OVF_vect
100. {
101. TCNT1 = timer1_counter;
102. count++;
103. if count == 18 detik
104. {
105. a = 1;
106. count = 0;
107. }
108. }