Skip to content

Instantly share code, notes, and snippets.

View cyberpunk042's full-sized avatar

Cyberpunk 042 cyberpunk042

View GitHub Profile
@elktros
elktros / Arduino_Water_Flow_Sensor.ino
Created June 18, 2018 10:48
Code for interfacing YF-S201 Water Flow Sensor with Arduino UNO.
const int watermeterPin = 2;
volatile int pulse_frequency;
unsigned int literperhour;
unsigned long currentTime, loopTime;
byte sensorInterrupt = 0;
void setup()
{
pinMode(watermeterPin, INPUT);