https://github.com/jmojiwat/zhongjiang.tinyclr
Yf-S201 & Yf-S402 water flow meter library for TinyCLR.
https://github.com/jmojiwat/zhongjiang.tinyclr
sensors tinyclr
Last synced: about 1 year ago
JSON representation
Yf-S201 & Yf-S402 water flow meter library for TinyCLR.
- Host: GitHub
- URL: https://github.com/jmojiwat/zhongjiang.tinyclr
- Owner: jmojiwat
- Created: 2021-01-02T04:02:10.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-03T06:26:13.000Z (over 5 years ago)
- Last Synced: 2025-02-01T20:30:36.976Z (over 1 year ago)
- Topics: sensors, tinyclr
- Language: C#
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Yf-S201 & Yf-S402 Water Flow Meter library for TinyCLR
This library uses a timer to measure water flow.
```c#
var gpioController = GpioController.GetDefault();
var capability = YfSCapabilityExtensions.Yf201Capability();
var wfm = new YfS(capability, SC20100.GpioPin.PA10, 2000, 1000, gpioController);
while (true)
{
var flow = wfm.VolumeFlowLitresPerMinute;
Thread.Sleep(2000);
}
```