Hi, I'm new and I am completely losing my mind with my uno! I've been interested in open source hardware since building a monome a year or so ago.
I've basically gone from knowing next to no programming to finally wrapping my head around it (albeit slowly!) and it's making me pretty happy on the inside! yay!
I am wanting to run a loop once. Basically all I need is for my lightPin to sense brightness and once it senses, the motor will power on (HIGH) and delay 2000ms till (LOW) but no matter what combination of statements I use, I can only manage to have it turn on and stay on constantly until my lightPin senses darkness. I've pasted my code below.
I hope this makes sense. The project I am attempting is to simply open up a set of household blinds once ambient light has hit a predetermined level using "threshold". Obviously once ambient light falls below a certain level, I will add to the code so it closes. I'll figure that out later.
Thanks heaps guys and maybe it's a good idea to have an "Absolute Beginner Talk" forum so people like me don't flood the "smart people" forum with stupid questions!
This requirement does not make sense. If the motor is supposed to run for 2 seconds, that's one requirement. If the motor is supposed to run until the sensor goes LOW, that is a different requirement.
Perhaps your issue with the code is really a matter of not being able to clearly define what the code is supposed to do.