Page 1 of 1

Access to physical sensors & appliances control in real time

Posted: Sat Oct 24, 2020 11:48 pm
by Janusz
Hi,
Just different post - not to solve some issues - but to show some opportunities :-)
It's very easy with nuBuilder to analyse, present and process all data stored already on computer disc.
But access to physical sensors, equipment or even to control appliances in real time - it's not more difficult :-)
Just recently I've bought Arduino with some sensors (in total 15USD) and was trying to connect it to nuBuilder - and it was very easy.
The big benefit is that Arduino can connect to web server therefore you can use php files to perform any tasks and communicate both ways.
It's a kind of fully mobile system - which can connect to the database from any part of the world - and the only condition is the access to the network.
If you are interested in such solution please find short movie how it works.
https://drive.google.com/file/d/1LYJVWX ... sp=sharing
If anyone would be interested to get some more details - I can provide.

Re: Access to physical sensors & appliances control in real

Posted: Sun Oct 25, 2020 1:04 am
by kev1n
Hi Janusz!

What a neat example! If I ever get to buy Arduino too, I'll certainly ask you for details on the implementation.

BTW: I suppose you use apaxcharts (instead of google charts)

Re: Access to physical sensors & appliances control in real

Posted: Sun Oct 25, 2020 1:20 am
by Janusz
Yes - charts are from:
https://apexcharts.com/

Re: Access to physical sensors & appliances control in real

Posted: Wed Dec 16, 2020 7:55 am
by ernesttan1976
Very cool guys!

Re: Access to physical sensors & appliances control in real

Posted: Wed Dec 16, 2020 9:24 pm
by steven
Janusz,

That is really interesting.

It opens up so many new worlds.


Steven

Re: Access to physical sensors & appliances control in real

Posted: Thu Jan 14, 2021 9:55 pm
by Janusz
Hi,
I prepared a YouTube video for Polish Arduino users. It is not in English, but maybe some of you know Polish :)
So overall the video is not much different to the one I posted earlier - but with some improvements made to the app. and with more focus on the nuBuilder.
So if someone would be interesting to see - link is just belowe.

https://youtu.be/B8anlIeFiPo

Re: Access to physical sensors & appliances control in real

Posted: Thu Jan 14, 2021 11:58 pm
by treed
The only Polish I know is a bit of reverse Polish notation. Thanks for this post. I am automating our production line and just got an Arduino UNO working with sonar sensor to monitor the level in a sawdust hopper. I have made a Java HMI for Arduinos for previous projects. I'm looking forward to integrating nuBuilder into our production line. At least you code in English. Thanks!

Re: Access to physical sensors & appliances control in real

Posted: Fri Jan 15, 2021 7:34 am
by Janusz
Hi treed,
I'm glad that other people here are using Arduino. If you would need some more details - just let me know and I can share.
In the example here I use Arduino WeMos D1 as it has wifi module included so connection to local wifi network do not require any additional modules to install.
And if it's connected to the network then data exchange with mysql database is very easy. Just to call php procedures from Arduino code:
(some example)

Code: Select all

  //GET method - read from MySql
  http.begin(server_2arduino_url);
        http.GET();
        String data = http.getString();
  http.end();

Code: Select all

//GET method - wtite to MySql
http.begin(arduino_2server_url+"?temp="+String(temperature)+"&hum="+String(humidity)+"&temp2="+String(temperatureC));
        http.GET();
http.end();
the urls can be as following:

Code: Select all

const String arduino_2server_url =  "http://192.168.6.105/ArduinoDB/arduino1.php";
const String server_2arduino_url =  "http://192.168.6.105/ArduinoDB/arduino2.php";
const String arduino_sampling_url = "http://192.168.6.105/ArduinoDB/arduino3.php";
in the php you can place any code you want.

Re: Access to physical sensors & appliances control in real

Posted: Sun Jan 24, 2021 3:57 pm
by Janusz
Hi,
Please find enclosed English version of video how to connect Arduino to nuBuilder.

https://nubuilderforte.blogspot.com/202 ... ds-to.html
.