In my project I want to use a UV sensor data and send it to my computer so it can be read thru Max/msp.
I can you show you what I have (which is not much on the udp side of things) but what I have from an example I'm not really understanding and even questioning if I need all that code in it. https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/examples/NTPClient/NTPClient.ino
#include <Wire.h> // I2C communication lib
#include "Adafruit_SI1145.h" // UV_Sensor Lib
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
char ssid[] = "*************"; // your network SSID (name)
char pass[] = "********"; // your network password
unsigned int localPort = 2390; // local port to listen for UDP packets
WiFiUDP udp;
Adafruit_SI1145 uv = Adafruit_SI1145();
void setup() {
Serial.begin(9600);
WiFi.begin(ssid, pass);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println(WiFi.localIP());
Serial.println(udp.localPort());
}
void loop() {
Serial.println(uv.readVisible()); // Visible - ??
Serial.println(uv.readIR()); // IR - Infrared
float UVindex = uv.readUV();
// the index is multiplied by 100 so to get the
// integer index, divide by 100!
UVindex /= 100.0;
Serial.println(UVindex); // UV - Index 0 - 11
delay(1000);
}
So could somebody guide me a bit thru what I would need for my project and/or show me information about this.