After reading a bit in the Documentation section and clearing my mind from complicated thinking I managed to get a second project going.
Simple Arduino set up using a normal LED for measuring voltage according to how much light in the room.
I write the values as numbers as well as plot them in a Time plot.
and here the code
Code: Select all
#include "MegunoLink.h"
InterfacePanel LAS;
TimePlot AnalogTomVolt;
int LedSensor;
float mVolt;
void setup()
{
Serial.begin(9600);
pinMode(13, OUTPUT);
digitalWrite(13, LOW);
}
void loop()
{
LedSensor = analogRead(A0);
mVolt = LedSensor * 4.8875;
AnalogTomVolt.SendData("Analog", LedSensor);
AnalogTomVolt.SendData("mVolt", mVolt);
LAS.SetNumber("A0", LedSensor);
LAS.SetNumber("CmV", mVolt);
delay(500);
}