Micropython学习交流群 学习QQ群:786510434 提供多种固件下载和学习交流。
Micropython-扇贝物联 QQ群:31324057 扇贝物联是一个让你与智能设备沟通更方便的物联网云平台
Micropython学习交流群 学习QQ群:468985481 学习交流ESP8266、ESP32、ESP8285、wifi模块开发交流、物联网。
Micropython老哥俩的IT农场分享QQ群:929132891 为喜欢科创制作的小白们分享一些自制的计算机软硬件免费公益课程,由两位多年从事IT研发的中年大叔发起。
micropython-dftds
from machine import ADC import dftds # must be an analog pin TDS_PIN = 28 # create TDS object remembering to set the values according to your device. On raspberry pico the ADC range is 65535. # another thing to observe, on rasberry pico we have memory flash available, if you need this code to work on another storage device such as EEPROM you might need to create another implementation of KValueRepository. Feel free to open an PR and contribute. tds_sensor = dftds.GravityTDS(TDS_PIN, adc_range=65535, k_value_repository=dftds.KValueRepositoryFlash('tds_calibration.json')) tds_sensor.begin() # you can read the temperature using a dht22 or other device tds_sensor.temperature = 25.0 tds_value = tds_sensor.update() print("TDS: {}ppm, EC: {} mS/cm".format(tds_value, tds_value*2))
https://github.com/WendelHime/micropython-dftds/tree/main?tab=readme-ov-file#micropython-dftds
Copyright © 2014 ESP56.com All Rights Reserved
执行时间: 0.01192307472229 seconds