im creating a miniature project that works at night , if the LDR detects less than 500 analog input(not sure what this number is. but if i run serial monitor, these are the readings), it will pass through the PIR/Body Sensor, then when the sensor detects movement the LED and Buzzer will turn HIGH. this program works fine in the arduino itself, but when i upload it to the ATTiny2313, it seems that the analog inputs or AnalogRead wont work i guess. When i connect the IC on the 5V power supply, it will automatically turn the LED and the BUZZER, why? my codes attached bellow. Also, i follow the instruction on how to use ATTiny2313 correctly.
See reference:. http://www.instructables.com/id/How-to-Program-ATtiny2313-Current-and-Updated/.
i also connect the pins correctly with analog and digital inputs and outputs. here the link:
http://www.element14.com/community/servlet/Ji...mage/2-50246-76876/ATtiny2313-PIN+MAPPING.PNG
sorry for bad english.
please help me.
See reference:. http://www.instructables.com/id/How-to-Program-ATtiny2313-Current-and-Updated/.
i also connect the pins correctly with analog and digital inputs and outputs. here the link:
http://www.element14.com/community/servlet/Ji...mage/2-50246-76876/ATtiny2313-PIN+MAPPING.PNG
sorry for bad english.
please help me.