Combining sketches and wiring?

Hi, I'm new to arduino and electronics, wonder if you can advise me on this wee project I'm trying out . I'm into photography, trying to get water drips to collide. I found a programme in Instructables that opens and closes a solenoid, the guy uses blink sketch to activate the solenoid and change the speed of the activation ( or water drips in my case.)

I've been following your lessons on Arduino and I've just came onto the lesson about using a switch, so I'm wondering how I can combine the blink sketch with the button sketch, and the correct way to do the wiring up on my Arduino board for the both of them so that I can stop and start the water drips, I need to be able to control 2 drips then stop the solenoid

I've really been enjoying your lessons, but I'm almost 70, if you can help I'd be very grateful.

bekathwia2 months ago

Sounds feasible! The wiring should be similar to the switch circuit, and you already know how to set a pin HIGH and LOW with digitalWrite();. Without knowing how the switch is supposed to affect the solenoid action, I can't say what mods to the switch code you'd have to make, if any. Solenoids draw a fair bit more power than a single LED, so you'll want to use something similar to the transistor/motor circuit at the end of this lesson to allow a lot of current to flow when the pin is triggered (but not deliver that electricity through the pin itself, you see). Unfortunately I cannot create custom diagrams and Arduino sketches for every student, regardless of age, but can offer an encouraging word and verification that your project idea is within your reach!

0range (author)  bekathwia2 months ago

Hi bekathwia,

The fact that my project sounds ok and is within my reach is really encouraging, I've learned a lot since asking my question and if I'm successful I'll send you my results, thanks. These singles will soon be doubles!!

DSC_0097.JPGDSC_0003 (1).JPG