Wouldn't a relay board be easier?

https://www.ebay.com/itm/1CH-2CH-4CH...H4U4QOng0awJrg