accumlate-string node is a much better starting point for coding this solution than my code above. You could just write a wrapper for accumlate-string to do everything except the BCKS pin; adding BCKS will require adding to accumulate-string code rather than just adding a wrapper node.