Need help with a basic script with a float switch and a relay

Hello all,

I would like to build a simpje project (I think) but I can't figure out how to setup the script so it would be awesome if someone could help me with this.

What have I connected to my Arduino Uno:
Relay (basic arduino relay with GND,IN1, VCC) connected to GND, 5V and pin 8
On/off float switch connected between pin 8 and 5V with a 10k resistor between ground and pin 8

What I want it to do:
I want something like a timer (with seconds) to turn the relay on and off
for example:
Relay 36 seconds ON
Relay 1 hour 31 min 40 sec OFF
repeat
repeat

BUT the relay may only turn ON when the float switch is in the HIGH position.

Thanks in advance,

Michel

Well, then just do it. Guess you should do some reading on programming first.

Hi Michel,

Seems fairly straightforward. See my PM for specific questions and ideas. There are a few logic conditions that still need to be thought through / specified.

Pat.

Relay (basic arduino relay with GND,IN1, VCC) connected to GND, 5V and pin 8
On/off float switch connected between pin 8 and 5V with a 10k resistor between ground and pin 8

You have two things connected to pin 8...

I believe the float switch is a simple on off switching 5v to pin 8. The 10k is pull down. I don’t see an issue with that.