Skip to content

jmceara/GUVA-S12SD-ESP32

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arduino library for GUVA-S12SD (UV sensor)

GUVA-S12SD is used in Grove UV sensor

Getting Started

#include <GUVA-S12SD.h>
GUVAS12SD uv(A0);

void setup()
{
    // Nothing TODO
}

void loop()
{
  float mV = uv.read();
  float uv_index = uv.index(mV);
  Serial.println(uv_index);
}

Library Reference

  • GUVAS12SD(int connectedPinNo, float workingVoltage = 5.0, int samplingCount = 1000) - Constructor
  • float read() - Return milli voltage by reading GUVA-S12SD
  • float index(float read_mV) - Calculate UV index from milli voltage

EPS UV Index

#index returns float. As below when you need EPA UV index;

  int epa_uv_index = (int) uv.index(uv.read()) + 1;

LICENCE

Apache 2.0

EoT;

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages