• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomepcDuinoLinux ApplicationsInstall LAMP server on pcDuino
Previous Next

Install LAMP server on pcDuino

Posted by: Alvin Jin , March 15, 2014

Install LAMP server on pcDuino is very easy. Here we share the whole process of installation.

The below software packages are install from apt (apt-get update first):

  • lamp-server
  • phpmyadmin
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
sudo service apache2 reload
ssh
nano
htop

Better system performance if you install php4-apc

# apt-get install php-apc

Let integrate Arduino hardware interface. Here we have to integrate the SPI Interface.

We recompile RPI SPI PHP module on pcDuino. Frak’s link is here.

Unzip Frak’s code
Install php5-dev:

$sudo apt-get install php5-dev

Use the commands to compile and install:

phpize
./configure --enable-spi
make
make install

Then we create a new file spi.ini under  /etc/php5/conf.d, input below text in it.

; configuration for php spi module
extension=spi.so

We put  entension=spi.so into /etc/php4/apache2/php.ini

This is our php test code:

<?php
$spi   = new spi(0, 0, array('speed' => 1000000));
$a = 0;
while($a<255) {
   $data = array(0xfe,0x01,$a,0xbb);
    $spi->transfer($data);
    //$spi->usecDelay(500000);
    $a++;
}

echo "Sent...";
?>

Tags: Linux Applications

Share!
Tweet

Alvin Jin

About the author

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors