The idea of this application is to help WEB based application to talk with industrial hardwar.
This application provides simply an HTTP server that ggenerates XML responses. The content of this responses is state of the digital inputs, digital outpust, pulsed outputs, analog inputs, electronic scales, etc.
Ofcourse wia HTTP we can manipulate the outputs of the device.
Pi-Cons has LCD display that can displays WEB pages. This is verry usefull becaus we can create simple and same time beautifull user interface with dynamic forms and content.
- Application is opening only port 80. To change this you shoud change PORT_NUMBER in main.py.
- Application can work only with 4 fixet GPIOs as outputs, 6 fixet GPIOs as inputs, 8 fixet analog inputs via MCP8003. The chip is connected via SPI0.
The application uses the RAspberry Pi GPIO API for interacting with the underlying IO hardware. This means it Just Works with a growing number of boards, including:
- Raspberry Pi 2 model A
- Raspberry Pi 2 model B
- Raspberry Pi 3 model A
- Raspberry Pi 3 model B
This code is released under the MIT License. https://opensource.org/licenses/MIT
- Enable SPI:
- pi@picons:~ $ sudo raspi-config.
- Use the down arrow to select 5 Interfacing Options
- Arrow down to P4 SPI.
- Select yes when it asks you to enable SPI,
- Also select yes if it asks about automatically loading the kernel module.
- Use the right arrow to select the button.
- Disable login shell over serial
- pi@picons:~ $ sudo raspi-config.
- Use the down arrow to select 5 Interfacing Options
- Arrow down to P6 Serial.
- Would you like a login shell to be accessible over │ serial? #No
- Would you like the serial port hardware to be enabled? #Yes
- Use the right arrow to select the button.
- Select yes when it asks to reboot
-
Go to home directory.
cd ~
-
Download the software from the repository.
sudo git clone https://github.com/bgerp/PiCons.git
-
Go to PiCons directory.
cd PiCons
-
Setup the software.
sudo bash picons_setup.sh
-
the device will autmaticly reboot affter instalation.
-
Login to the device.
-
Go to home directory.
cd ~
-
Go to PiCons directory.
cd PiCons
-
Run the test.
sudo bash picons_test.sh