http://qs1969.pair.com?node_id=11124700


in reply to Controlling USB on Raspberry Pi

I am considering building a controller using a Raspberry Pi Zero and a relay module.

So you need to configure two GPIO pins as outputs and set the logic level to high or low. And you don't have any strict timing requirements. It simply does not matter if it takes 0.1 ms, 1 ms, 10 ms or 100 ms to switch the relais. So, you can use the sysfs interface of the Raspi. All you need to do is to write some virtual files, which is trivial in Perl and bash.

Controlling relais isn't that hard either, Amazon has a lot of simple relais modules that accept a 3.3 V logic level input and can switch 110 V or 230 V. Just make sure the relais can switch the current (A) and voltage (V) required by the electric curtains.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)