Hey this is really awesome stuff! I tried it out with a pinoccio board. (Check em out, they're new: https://pinocc.io/) Which uses an ATMega256RFR2 and I am unfortunately getting results that don't seem to be working. I changed the code as shown about to print mean values and get outputs that look like the following:
77 -1 -1 -1 -1 -1
210 -1 -1 -1 -1 -1
92 -1 -1 -1 -1 -1
102 -1 -1 -1 -1 -1
105 -1 -1 -1 -1 -1
91 -1 -1 -1 -1 -1
87 -1 -1 -1 -1 -1
109 -1 -1 -1 -1 -1
166 -1 -1 -1 -1 -1
112 -1 -1 -1 -1 -1
87 -1 -1 -1 -1 -1
104 -1 -1 -1 -1 -1
98 -1 -1 -1 -1 -1
227 -1 -1 -1 -1 -1
This seems... Odd? I'm not sure what expected behavior is. I'll try it out with an UNO, and see what I get, then maybe dig in to the code further. Thanks for all the work, this is really great.