Switch branches/tags
Nothing to show
Find file History
Latest commit 5ffb734 Jun 15, 2018
Failed to load latest commit information.
README.md Docu Mar 16, 2018
counting.ino add some images Jun 15, 2018


Andino X1 Firmware Sample

Andino X1, a base board that allows the raspberry pi to be used in an industrial environment.

Andino X1 - Raspberry Pi on DIN Rail


This example counts impulses at the digital inputs. Count stops are cyclically sent to the Raspberry. The digital inputs are additionally de-bounced. On the other hand, the relays can be switched or pulsed. The settings of the firmware are changed via commands and are stored in the eeprom. This Version consider the extension boards 3DI and 1DI2DO (Command HARD).

The Communication runs with 38400 Baud.

This Sample needs the TimerOne library.

Interface, Commands

All commands or messages are sent and received via /dev/ttyS0. Every command has to be terminated by CR or LF. Message ends with CR and LF.

Commands to the Controller

Command Arguments Action Example
RESET none Restart the Controller RESET
INFO none Prints the current settings INFO
HARD 0=noShield, 1=1DI2DO, 2=3DI Set the Hardware configuration 0 - none
POLL Cycle in ms Sets the sampling cycle of the digital inputs [in ms] POLL 1000
SKIP Number of polls Skip n Scans after pulse reconized 0
EDGE HL(0) LH(1) Count on edge HL or LH EDGE
SEND Cycle in ms The counter will send all nnn milliseconds SEND 5000
DEBO Number of polls Sets the debounce count. The signal has to be stable for nn polls DEBO 100
POWR state (0 or 1) Power-Out Relay is switched on or off REL1 1
REL1 state (0 or 1) Relay 1 is switched on or off REL1 1
REL2 state (0 or 1) Relay 2 is switched on or off REL2 1
REL3 state (0 or 1) Relay 3 is switched on or off REL3 1
RPU1 pulse in sec Pulse the Relay 1 for nns seconds RPU1 2
RPU2 pulse in sec Pulse the Relay 2 for nns seconds RPU2 2

Messages from the Controller


The Message starts with a ':'. After that follows a Message-ID. This is a modulo HEX Counter from 0..FFFF.
Then within a '{' '}' the counter follows. The number of counter depends on the Hardware shields.
The Counter are HEX encoded and runs from 0 to FFFF (modulo).
Then again within a '{' '}' the current state of the inputs follows. 0-off, 1-on.
The number depends on the Hardware shields. The Message ends with a CR / LF [0x0d + 0x0a]