View: 10649|Reply: 5

Web Server? Need help.

[Copy link]

1

threads

3

posts

41

credits

Novice

Rank: 1

credits
41
Published in 2016-9-15 21:22:03 | Show all floors |Read mode
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.

Published in 2016-9-15 22:03:35 | Show all floors
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.

Orange PI PC

1

threads

3

posts

41

credits

Novice

Rank: 1

credits
41
 Author| Published in 2016-9-16 14:59:55 | Show all floors
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?
Published in 2016-9-16 17:33:57 | Show all floors
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

Orange PI PC

1

threads

3

posts

41

credits

Novice

Rank: 1

credits
41
 Author| Published in 2016-9-19 19:29:37 | Show all floors
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.

0

threads

2

posts

22

credits

Novice

Rank: 1

credits
22
Published in 2016-10-2 19:36:55 | Show all floors
Instructables is a great website with tutorials on how to make systems like this.
I would take a look on there and search for a temperature measurement system with the raspberry pi.

Hopefully this helps!
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list