login|Register
Forum > Beginners
Post|
看13517|回17|Favorite
baev_al 看全部
2016-9-15 21:22:03
Hello, friends.
I am programming microcontrollers (STMs) and working with SBC is somewhat confusing to me.
I would like to make a simple task – login to web interface, put or remove marker and respectively turn on or off a led.
Do I need to install a server to Orange Pi Plus (I have this board)?
I checked led blinking with simple C program (everything is ok). How should I connect this program to web interface? Maybe my questions are incorrect please point out the necessary information to study.
Thanks.

darqoq 看全部
2016-9-15 22:03:35
Hi,
The are a lot of way to do this.
One of the simplest is:

1. install php server,
2. write php script using shell_exec (http://php.net/manual/en/function.shell-exec.php) to execute your simple C program.

baev_al 看全部
2016-9-16 14:59:55
Thanks, darqoq.
I installed Armbian and I managed to connect to the board from the desktop in my own LAN using Putty. How can I connect from the outside? How should I install php server?
darqoq 看全部
2016-9-16 17:33:57

quote:

baev_al replied at 2016-9-16 07:59
Thanks, darqoq.
I installed Armbian and I managed to connect to the board from the desktop in my own ...

if you want to connect from outside LAN using :
- putty (you mean using ssh ?) you have to open port 22 on WAN
- web page you have install for example php server (or other web server that allows you to execute your code) and open port 80 on WAN

baev_al 看全部
2016-9-19 19:29:37

quote:

darqoq replied at 2016-9-16 17:33
if you want to connect from outside LAN using :
- putty (you mean using ssh ?) you have to open po ...

Thanks, I managed to connect to server.
Putty is SSH.
PHP server is also working.
The next question is how to make a measurement temperature once per minute.
What I want: 1) connect a temperature sensor to GPIOs (i would like to use DS18B20, but don't know how jet); 2) go to my web page form the outside and watch how the value of temperature changes (maybe add some diagram - temperature vs time).
For example, I have a measurement program temp_measure.c. How should it be launched once per minute? How the measured value should be transferred to my web page?
Thanks.
1234NextPage

OrangePi En

Powered by Discuz! X3.4

homepage|Simple edition|Touch edition|PC