Author Topic: How to get started programming something like FPP  (Read 821 times)

Offline shockwave

  • Newbie
  • *
  • Join Date: Sep 2016
  • Location:
  • Posts: 13
  • Kudos: 0
How to get started programming something like FPP
« on: October 27, 2016, 11:01:40 AM »
I'm an embedded guy, and so I know c, c++, and soldering iron.  :)


I'm interested in learning how to program a webpage onto the Pi, like the FPP has.  Such that all I would have to do is type /myname and that devices webpage would appear.  Could someone give me a few pointers on getting started in this direction? 


Thank you all, and excellent work on the FPP.  it has saved my show this year, as I wasn't going to be able to have sequenced music otherwise.  Good show!

Online David Pitts

  • Administrator
  • *****
  • Join Date: Mar 2013
  • Location: Falcon, CO
  • Posts: 3,737
  • Kudos: 63
Re: How to get started programming something like FPP
« Reply #1 on: October 27, 2016, 01:42:58 PM »
Will device be a PI or some other device.
PixelController, LLC
PixelController.com

Offline Bshaver

  • Developer
  • ******
  • Join Date: Aug 2014
  • Location: Denver, CO
  • Posts: 1,326
  • Kudos: 22
Re: How to get started programming something like FPP
« Reply #2 on: October 27, 2016, 04:13:33 PM »
Like a system configuration page, that you can go to and navigate to all your devices that have UIs as web pages. Sounds very cool!

Online David Pitts

  • Administrator
  • *****
  • Join Date: Mar 2013
  • Location: Falcon, CO
  • Posts: 3,737
  • Kudos: 63
Re: How to get started programming something like FPP
« Reply #3 on: October 27, 2016, 05:33:03 PM »
Sorry did not see the PI reference the first time.

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 8,383
  • Kudos: 158
Re: How to get started programming something like FPP
« Reply #4 on: October 27, 2016, 05:45:36 PM »
Do you want the custom URL to redirect to the device's web page or do you want the FPP UI to transparently proxy over to the device?
-
Chris

Offline shockwave

  • Newbie
  • *
  • Join Date: Sep 2016
  • Location:
  • Posts: 13
  • Kudos: 0
Re: How to get started programming something like FPP
« Reply #5 on: October 28, 2016, 07:49:40 AM »
I mean where I get the apache dynamic website on the PI.  I have written console programs in Linux, but I'd like to be able to have a dynamic webpage I can go to instead.

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 8,383
  • Kudos: 158
Re: How to get started programming something like FPP
« Reply #6 on: October 28, 2016, 10:29:42 AM »
FPP is written in PHP.  If you want to see how to get some CLI type content on a webpage, you can look at a couple files in /opt/fpp/www

troubleshooting.php
troubleshootingCommands.php

The commands script has a list of commands in an array and we take that array and run the commands and populate another array.  The troubleshooting.php page includes the commands php script and takes the results array and displays it on screen.  Those two pages might help you see how you can run CLI commands and display the results in a php web page.

If you want to use FPP to test your code, you can just drop a new file in /opt/fpp/www and hit that in your browser.  if you create a file called shockwave.php in that directory you can browse to http://fpp/shockwave.php and see your page.

Offline shockwave

  • Newbie
  • *
  • Join Date: Sep 2016
  • Location:
  • Posts: 13
  • Kudos: 0
Re: How to get started programming something like FPP
« Reply #7 on: October 28, 2016, 11:32:38 AM »
Okay, I'll have to learn PHP.  And there's a handy dandy way to test my experiments. 


Thank you very much.  This'll probably keep me busy for some time.  I still wonder how typing /fpp directs to the IP address of the Pi.  My guess is the Pi tells the router that /fpp is x.x.x.x ip address somehow.  But I'll start working on PHP and look at the source code and see what I can figure out.


Thank you very much.

 

Back to top