June 15, 2017 at 7:42 pm #4463
I’m helping at my local primary school and they are designing a night light using a crumble. Some of them want to use an ldr to turn it on when the light drops. We have managed to get it to work by piggy backing a crocodile clip on a power output and wiring a sparkle up using its d terminal and the other ldr clip on c but can you use the correct sparkle connection then a normal a,b,c for the ldr without piggy backing a clip? If so what would the program have to look like. My apologies I’m new to this but getting into it. Thanks for any help.June 17, 2017 at 9:14 pm #4466
An LDR can be connected to any of the I/O pads (A,B,C or D). If you are using Sparkle commands, though, the Sparkle needs to be connected to D so then one leg/pad of the LDR would be connected to A,B or C and the other to a “+” pad (this could be on the battery box or the “+” output on the right-hand side of the Sparkle).
When the LDR is exposed to light it allows the current to pass through it to the I/O pad (the input will be “high”). When the LDR is covered no current flows and the input is “low”. A diagram of the set-up and example program are attached.
Let me know if any of this doesn’t make sense!
Attachments:You must be logged in to view attached files.
You must be logged in to reply to this topic.