Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
View: 4589|Reply: 5

Web Server? Need help.

[Copy link]

1

Threads

3

Posts

41

Credits

Novice

Rank: 1

Credits
41
Post time 2016-9-15 21:22:03 | Show all posts |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.

Post time 2016-9-15 22:03:35 | Show all posts
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| Post time 2016-9-16 14:59:55 | Show all posts
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?
Post time 2016-9-16 17:33:57 | Show all posts
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| Post time 2016-9-19 19:29:37 | Show all posts
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
Post time 2016-10-2 19:36:55 | Show all posts
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 have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2019-11-13 15:34 GMT+8 , Processed in 0.030980 second(s), 22 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list