Holding electronics in place doesn’t need to be complicated. Use elastic–just trim a length from a rubber band.