But this signal is so feckless and fickle that you can't pay much attention to it.
However, I publish it in case someone may find it useful for other purposes.
For example, use the analog input of the ESP8266 to move the LED bar.
Code: [Local Link Removed for Guests]
spi.setup 100000 ' set the SPI port at 100KHz
pin.mode 16, output ' set the Pin used for CS as output
pin.mode 12, output ' set the pin used for the buzzer
prev = 0
for i = 0 to 8
gauge i
pause 500
next i
for i = 8 to 0 step -1
gauge i
pause 500
next i
for i = 1 to 30
x = rnd(9)
t = convert.map(x, 0, 8, 380, 740)
pin.tone 12, t, 50
gauge x
pause 250
next i
while 1
rssi = abs(wifi.rssi)
' percent = 150-(5/3) * rssi
percent = convert.map(rssi, 30, 90, 100, 0)
percent = cint(percent)
wlog percent
percent = convert.map(percent, 35, 85, 0, 8)
percent = cint(percent)
wlog percent
if percent <> prev then
prev = percent
t = convert.map(prev, 0, 8, 380, 740)
pin.tone 12, t, 50
gauge percent
end if
pause 3000
wend
end
SUB gauge(x)
LOCAL ledbar, r
ledbar = (2^x) - 1
pin(16) = 1 ' put the CS HIGH
r = spi.byte(ledbar)
pin(16) = 0 ' pulse the CS low then high
pin(16) = 1
END SUB
https://www.myrapidq.it/public/barra_led_1.mp4