[TASK] Printing "hello, world!" via a UART

[TASK] Printing "hello, world!" via a UART

Postby admin » Wed Nov 04, 2015 12:48 pm

We will go through an example of printing “hello, world!” via a UART by using a PHPoC Blue.

Image
Image
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";

uart_setup(0, 9600, "N81N");

while(
1)
{
    uart_write(0, "hello, world!\r\n");
    sleep(1);
}
 
?>


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: 153
Joined: Mon Jan 20, 2014 4:40 pm

Return to Example

Who is online

Users browsing this forum: No registered users and 1 guest

cron