[TASK] Controlling user-definable onboard LED

[TASK] Controlling user-definable onboard LED

Postby admin » Wed Nov 04, 2015 2:56 pm

We will go through an example of controlling user-definable LED on a PHPoC Blue.

Image


Source Codes
1. task0.php

Code: Select all

<?php

if(_SERVER("REQUEST_METHOD"))
    exit; // avoid php execution via http request
 
include_once 
"/lib/sd_340.php";
 
echo 
"PHPoC example : P4S-34X / UIO / blink on-board LED\r\n";
 
uio_setup
(0, 30, "out high");
uio_setup(0, 31, "out high");
 
while(1)
{
    uio_out(0, 30, LOW);
    uio_out(0, 31, HIGH);
    usleep(250000);
 
    uio_out
(0, 30, HIGH);
    uio_out(0, 31, LOW);
    usleep(250000);
}
 
?>


Please download a PSP (PHPoC Support Package) of libraries and examples from PHPoC, and upload it in the PHPoC Blue.




Video

phpBB [video]
admin
Site Admin
 
Posts: 167
Joined: Mon Jan 20, 2014 4:40 pm

Return to Example

Who is online

Users browsing this forum: No registered users and 2 guests

cron