I'm looking for a function that allows me to make an action something like
Code: Select all
If RSSI =x & ID = X
then set ID X
else
ID = Y
Can anyone point me to an easy to understand guide to RSSI and micropython please?
Code: Select all
If RSSI =x & ID = X
then set ID X
else
ID = Y
Code: Select all
s = network.WLAN()
s.active(True)
result = s.scan()
Code: Select all
>>> result[1][3]
-67
Thanks, just what I was looking for.pythoncoder wrote: ↑Sat Apr 13, 2019 7:21 amRSSI is returned by the scan functionThe result is a list of tuples, one for each detected network. For entry x result[x][0] is the SSID and result[[x][3] is the RSSI in dBm. For example here my own network's SSID appears in result[1][0] soCode: Select all
s = network.WLAN() s.active(True) result = s.scan()
meaning I'm getting -67dBm.Code: Select all
>>> result[1][3] -67