close-circle
Close

Web controller release and how to use it

A project log for Internet controllable LED message marquee

led marquee controlled with two arduino, and an ethernet shield

Xylitol 09/23/2017 at 16:580 Comments

Hello,
Finally here is the release of the web controller, you can find it in the file manager.
And so now you can build your own functional controlable led screen over internet.
I've deviated a bit from my previous ideas about my web app dev logs, so what's changed?, and what does that look now? here the answers:

That all, now some screenshots.

Authentication:

To change the reCAPTCHA API key pair, open the file adminAccount.php and change line 14.

$secret = '6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe';

And index.php, line 50:

<center><div class="g-recaptcha" data-sitekey="6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI"></div></center>

A guide to get your key pair can be found here: https://developers.google.com/recaptcha/intro on google website.

For the SQL settings, open the "DB.class.php" file on a text editor. Now specify the database host ($dbHost), username ($dbUsername), password ($dbPassword), and name ($dbName) as per your database server credentials.:

private $dbHost     = "localhost";
private $dbUsername = "root";
private $dbPassword = "";
private $dbName     = "arduino";

For the forgot password email feature, open the "email_functions.php" file in a text editor and do the following changes:

Specify your domain (example.com) in $resetPassLink variable and specify also the sender name ($serderName), sender email ($serderEmail), and body content ($mailContent).

$resetPassLink = 'http://example.com/admin/resetPassword.php?fp_code='.$userData['forgot_pass_identity'];
$serderName = 'HLVLED-F3.75R-16S';
$serderEmail = 'sender@example.com';
		
$to = $userData['email'];
$subject = "Password Update Request | HLVLED-F3.75R-16S";
$mailContent = '<p>Dear <strong>'.htmlentities($userData['first_name']).'</strong>,</p>
        <p>Recently a request was submitted to reset a password for your account. If this was a mistake, just ignore this email and nothing will happen.</p>
        <p>To reset your password, visit the following link: <a href="'.$resetPassLink.'">'.$resetPassLink.'</a></p>
        <p>Let us know at contact@example.com in case of any query or feedback.</p>
        <p>Regards,<br/><strong>HLVLED-F3.75R-16S Staff</strong></p>';

That's enough, now create a database (for example arduino) on phpMyAdmin and import the "SQL/arduino_web.sql" file on this database.

The default credential are:
user: admin@admin.net
pass: admin

Open the admin URL (http://example.com/led/admin/) on the browser and log in to the admin panel and change the login credentials.

Dashboard after authentication:

Add a new message:

List of message:

Site settings:

User profile:

Now for the arduino sketch, edit ethernetWireMaster.ino, line 9:

char server[] = "your-server.fr"; // change to your host
String dataLocation = "/led/index.php HTTP/1.1"; // change to your PHP page

 To where you have set up your web controller.
On the same file, line 73, you can adjust in milisecond the refresh interval for retrieving message:

delay(60000); // Delay before next loop (one minute).

 Voila, that all.

I've been running my display like that since 2 weeks now, with no interuption and an arduino sketch who call the gate each minute and everything seem fine and stable.

Discussions