Announcement

Collapse
No announcement yet.

How To Use PHPoC Support Package

Collapse
X
Collapse
  •  

  • How To Use PHPoC Support Package

    PHPoC Support Package (PSP) is a package that contains the external libraries and examples code, helping newbies quickly get started with PHPoC.

    This tutorial shows how to use examples in this package. It's very easy, just by some simple click.

    Let's start!


    PSP Overview

    PSP includes libraries and examples. Examples is diverse, varying from "hello, world" to networking tasks and how to use various sensors/actuators in different way.
    Sensors/actuators used for examples includes: LED, Buzzer, Touch sensor, Light sensor, Rotary Angle sensor, Ultrasonic sensor, Servo motor, Step motors.

    PSP tree structure:
    • ../lib : Libraries.
    • ../example: examples
      • /net: examples related to the networking function
        • /01.php_task: examples of using network protocols (e.g. TCP, DNS, Email, MySQL ...)
        • /02.html_text: examples of network configuration (e.g. IP Address, WiFi SSID and password ...) via web:
      • /p4s: examples of using well-known sensors and actuators
        • /01.php_task: examples of reading value from sensors and controling actuators
        • /02.html_text: examples of monitoring sensors and control actuators via simple web page
        • /03.html_image: examples of of monitoring sensors and control actuators via image-embedded web page
        • /04.html5_text: examples of of monitoring sensors and control actuators via WebSocket
        • /05.html5_graphics: examples of of monitoring sensors and control actuators via WebSocket with graphic user interface

    How To Use It

    Video



    Quick steps
    • If the example uses a sensor, wire sensor to PHPoC device
    • Connect PHPoC device to PC/Laptop via USB cable
    • Make sure that PHPoC Debugger has been installed (If not, see How To)
    • Open PHPoC Debugger, choose the right COM port, and click "Connect" button to connect PHPoC Debugger to PHPoC device
    • Download PHPoC Support Package and unzip it
    • Upload the related library files to /lib folder on PHPoC device. (It had better to upload all library files)
    • Upload a example to PHPoC device
    • If example needs to connect to Internet, configure network information for PHPoC device. (USB WLAN Dongle has to be inserted to PHPoC board)
    • If the example contains init.php file, click "Run" button on PHPoC Debugger (in order to run the file internally in system loop). If the example contains index.php file, open a Web Browser and type IP address of PHPoC devices to access Webpage on PHPoC device.
    Download Link

    Library Reference


    Source Code Files

    If you take a look to source code files of all examples in the PSP, you will realize that there are three kind of examples:
    • First type: examples include init.php and task0.php files
    • Second type: examples include only index.php file (may include some images)
    • Third type: examples include all init.php, task0.php and index.php
    What is init.php, task0.php and index.php? What is difference between them?
    • First type: These examples are type of applications that are run internally in system loop.
    • Second type: These examples are type of applications that are run in response to HTTP request. They provides Webpage
    • Third type: These examples are type of applications that are mix of two first types.
    The detail explanation is present in How PHPoC System Works and PHPoC System Files


    Other Resources
    Last edited by support; 03-16-2018, 09:28 AM.
      Posting comments is disabled.

    Categories

    Collapse

    Latest Articles

    Collapse

    • Arduino - RS-485 Expansion Board
      by support
      PES-2607 is an easy-to-use RS422/RS485 Expansion Board for Arduino Uno and Mega, which allows Arduino to exchange data with serial device via RS422 or RS485.
      Especially, Arduino does NOT use UART pins to communicate with RS422/RS485 expansion board. Therefore, users can use Arduino UART pins for other purposes.
      Moreover, A single Arduino Uno/Mega can communicate with multiple RS422/RS485 expansion boards (up to 14) without using Arduino UART pins.

      Library and examples for...
      11-13-2018, 02:45 PM
    • Arduino - RS-422 Expansion Board
      by support
      PES-2607 is an easy-to-use RS422/RS485 Expansion Board for Arduino Uno and Mega, which allows Arduino to exchange data with serial device via RS422 or RS485.
      Especially, Arduino does NOT use UART pins to communicate with RS422/RS485 expansion board. Therefore, users can use Arduino UART pins for other purposes.
      Moreover, A single Arduino Uno/Mega can communicate with multiple RS422/RS485 expansion boards (up to 14) without using Arduino UART pins.

      Library and examples for...
      11-13-2018, 02:44 PM
    • Arduino - RS-232 Expansion Board
      by support
      PES-2606 is an easy-to-use RS-232 Expansion Board for Arduino Uno and Mega, which allows Arduino to exchange data with serial device via RS-232.
      Especially, Arduino does NOT use UART pins to communicate with RS-232 expansion board. Therefore, users can use Arduino UART pins for other purposes.
      Moreover, A single Arduino Uno/Mega can communicate with multiple RS-232 expansion boards (up to 14) without using Arduino UART pins.

      Library and example for the RS-232 expansion board...
      11-13-2018, 02:43 PM
    • Arduino - Stepper Motor Controller
      by support
      PES-2605 is an easy-to-use stepper motor controller for Arduino Uno and Mega, which uses micro-stepping method to precisely control stepper motor.
      Library and example for the stepper motor controller are part of of PhpocExpansion library for Arduino. The library reference is available here.

      This tutorial shows how to use the step motor controller with an example of PhpocExpansion library for Arduino.


      Hardware Required...
      11-13-2018, 02:41 PM
    • Arduino - DC Motor Controller
      by support
      PES-2604 is an easy-to-use DC motor controller for Arduino Uno and Mega.
      Library and example for the DC motor controller are part of of PhpocExpansion library for Arduino. The library reference is available here.

      This tutorial shows how to use the DC motor controller with an example of PhpocExpansion library for Arduino.


      Hardware Required...
      11-13-2018, 02:40 PM
    • Arduino - Digital Input Board
      by support
      PES-2602 is an easy-to-use 4-port Input Expansion Board for Arduino Uno and Mega, which allows Arduino to monitor state of DC electric device. In addition, it can monitor NPN, PNP and dry contact(relay).
      Library and example for the 4-port input expansion board are part of of PhpocExpansion library for Arduino. The library reference is available here.

      This tutorial shows how to use 4-port input expansion board with an example of PhpocExpansion library for Arduino.

      ...
      11-13-2018, 02:39 PM
    Working...
    X
    😀
    🥰
    🤢
    😎
    😡
    👍
    👎