This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

BLE - Sensirion SHT31 Smart Gadget
#1
Has anyone connected a "Sensirion SHT31 Smart Gadget" to a BLE-Interface on LM5?

(The "Sensirion SHT31 Smart Gadget" is featured with an humidity and temperature and also it has a BLE Interface)

https://developer.sensirion.com/platform...pment-kit/

https://www.sensirion.com/fileadmin/user...-Guide.pdf
Reply
#2
Try this, no guarantee that this will work, change MAC to your device MAC. If connect fails try setting random to true.
Code:
require('ble')

mac = '01:02:03:04:05:06'
random = false

sock = ble.sock()
ble.settimeout(sock, 10)
res = ble.connect(sock, mac, random)

if res then
  humidity = ble.sockreadhnd(sock, 48)
  temperature = ble.sockreadhnd(sock, 53)

  loghex(humidity)
  loghex(temperature)
else
  log('ble connect failed')
end

Another option is to use ZigBee which will be ready for testing soon. There are temperature/humidity sensors (for example CCT593011_AS) which will work without any additional profiles/configuration.
Reply


Forum Jump: