Pinoccio / library-pinoccio

Arduino library for Pinoccio
Other
28 stars 24 forks source link

add energy detection and a survey #229

Open jacobrosenthal opened 9 years ago

jacobrosenthal commented 9 years ago

Fighting some really bad range right now and wanted to a field survey to see what was up. Atmel seems to do n seconds per channel I think? I was too lazy to implement that though Im open to it. I played with taking an n from bitlash in for the number of readings to take per channel, but I think thats a max 8 bit integer, it was crashing on 255, and Im worried about locking up the pinoccio loop so Im doing an arbitrary 254 readings per channel.

Let me know if you dont think this fits in your sniffer module @matthijskooijman

Requires https://github.com/Pinoccio/library-atmel-lwm/pull/4

> module.enable("sniffer")
> sniffer.survey
Ch: 11  -90
Ch: 12  -85
Ch: 13  -90
Ch: 14  -90
Ch: 15  -90
Ch: 16  -88
Ch: 17  -81
Ch: 18  -90
Ch: 19  -90
Ch: 20  -90
Ch: 21  -90
Ch: 22  -63
Ch: 23  -90
Ch: 24  -83
Ch: 25  -90
Ch: 26  -90

> print sniffer.ed
-90
>