Add write one wire function