It can be confusing when pins have different numbers for Digital and Analog.
Digital pin 0 is on physical pin 5.
Digital pin 3 is on physical pin 2.
Analog input pin 1 (or A1) is on physical pin 7 (same physical pin as Digital pin 2)
If you run the code on an UNO you will be using the pins marked D0, D3, and A1.
In Mr. Gammons sketch several times it noted #if definded(AVR_ATtiny85). Is this something that that "libraries" take into consideration when processing commands?
Should those lines be changes to #if defined(AVR_ATMega328P)? when working with a bare bones ATMega 328P-PU chip?
is that a drop top GTO? either way an AWESOME sled.
I wired everything up as defined in the tutorial. However it doesn't work as expected.
I get the pulse from D3 every 2 seconds (hooked it up to an LED) that's supposed to allow for the analog read on A1.. I'm using a sparkfun board, and D0 is noted as "RX" I actually need that pin for my project.
and didn't quite understand this line from Mr. Wasser's post
"Analog input pin 1 (or A1) is on physical pin 7 (same physical pin as Digital pin 2)"
I have my voltage divider (between the 56K and the LDR) going to A1. D3 to the other side of the LDR. And power to the LED comes from D0. (at least it is supposed to).
the resistance on the voltage divider is 23 ohms in the light and 48 ohms in the dark. and it reads quickly.
Hey guys, building Mr. Gammons project works as intended on my bare bones ATMega 328. Thanks for your help.
He did an excellent job in power consumption. BUT! I would like to undue part of it. It seems the only pin that is awake when it is dark is the blinking LED pin, which makes perfect sense. This power down stuff is really new to me and complicated. I am hoping one of ya'll can help with a modification?
The LED that currently blinks, that pin, will be used to switch on a NPN 3904 to power (from a separate source) an Adafruit FX Sound Board. I can successfully turn the FX board using this pin on and off for any given amount of time. However I have no serial control over the FX board because everything else is shut down.
My objective seems simple enough. Instead of a blinking LED. To power a sound board make it play instead of blink go to sleep for awhile, make it play instead of blink... then at day power down the whole thing as does the LED.
It's confusing because there are 2 different sleep/power down modes being used. Is it possible to accomplish?