Author Options:

Combining sketches and wiring? Answered

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.

2 Replies

bekathwiaBest Answer (author)2017-07-16

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!

Select as Best AnswerUndo Best Answer

0range (author)bekathwia2017-07-18

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!!

Select as Best AnswerUndo Best Answer