My first succesful ...

Share your projects using MegunoLink Pro here!
Post Reply
rsfoto
Posts: 36
Joined: Mon Nov 20, 2017 12:09 am

Sat Nov 25, 2017 7:50 pm

... creation of a UI with MegunoLink

Hi,

I know this is nothing fancy and the old dogs will laugh about it but it was a major achievement for me after a few hours of fiddling around and with the help of Phil and his inmense paitnece with me I maged to transmit data from my Arduino to a simple User Interface :shock:

Here the set up with the Arduino. It is a Voltage dicider absed on 2 Photoresistors and limited by a hole through which light falls. According to the position of the hole the voltage is higher or lower and that I am using for a device which will be a guider on the Sun.

Code: Select all

#include <Wire.h>
#include <MegunoLink.h>

InterfacePanel FR_ui;

float volt;

void leerFR()
{
  volt = analogRead(A0);
}

void setup()

{
  Serial.begin(14400);
  pinMode(13,OUTPUT);
  digitalWrite(13,LOW);
}

void loop()

{
  leerFR();
  volt = volt * 4.828;
  FR_ui.SetNumber("mVolt",volt);
  delay(1000);
}
FR_megunolink.JPG
FR_megunolink.JPG (110.42 KiB) Viewed 1224 times
IMG_2686_C1_ML.jpg
IMG_2686_C1_ML.jpg (188.64 KiB) Viewed 1224 times
IMG_2687_C1_ML.jpg
IMG_2687_C1_ML.jpg (204.47 KiB) Viewed 1224 times
regards Rainer

Observatorio Real de 14, SLP, MEX
philr
Posts: 275
Joined: Mon May 26, 2014 10:58 am

Sat Nov 25, 2017 11:53 pm

Nice work! Thanks for posting your first successful project. If anyone else wants to modify the interface panel from their Arduino check out our Arduino example called SendToMLP.ino
The arduino program is included in our library and can be found at github
https://github.com/Megunolink/MLP/blob/ ... dToMLP.ino

The corresponding MegunoLink interface
https://github.com/Megunolink/MLP/blob/ ... dToMLP.mlx

Instructions are also available in our documenatation
https://www.megunolink.com/documentatio ... ace-panel/
Post Reply