This is the default firmware for the Andino X1 board. It can count impulses from the digital inputs, display the input states, switch or pulse relays and read temperature data from DS18B20 temperature sensors. Count stops are cyclically sent to the Raspberry. The digital inputs are additionally de-bounced.

This firmware and its correct configuration is also a prerequisite for using the Andino X1 Node-Red node to integrate digital inputs, temperature data and relay control into Node-Red flows.

The Communication runs with 38400 Baud.

To install the firmware, first install and configure the Arduino IDE on your PC as described here. Afterwards, download the INO-File of the most recent version from GitHub (see download section at the bottom) and open it in the IDE. When prompted, accept to create a folder with the same name as the INO file. This Sample also needs the TimerOne, OneWire and DallasTemperature libraries. To install those, click Tools, then Manage Libraries. Here, search for TimerOne and hit install on the library with the same name. Repeat the same process for the other two libraries. After checking that the firmware compiles correctly by clicking Verify (the checkmark button) in the top bar, the firmware can be uploaded by hitting Upload (the arrow to the right).

For the hardware installation instructions of the DS18B20 sensors (if you choose to use them), please refer to this hardware installation guide.

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.

Command Arguments Action Example
RESET none Restart the Controller RESET
INFO none Prints the current settings INFO
HARD 0=noShield, 1=1DI2DO, 2=3DI, 3=5DI 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
SENDT Cycle in ms The counter will poll and send the busses every nnnn milliseconds SENDT 8000
CHNG Send on Change Send if any Pin changes. Carefull if many changes CHNG 1
CNTR Send Counter Send counter+states(1) or only states(0) (default 1) CNTR 0
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
REL? on-off (0 or 1) Send the current state of the Relays
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
REL4 state (0 or 1) Relay 4 is switched on or off REL4 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
TBUS 1=one bus, 2=2 busses Sets the number of temperature sensor busses to 1 or 2 TBUS 2
ADDRT 1=bus1, 2=bus2 displays the addresses of all sensors connected to the specified bus ADDRT 1


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.
If the Setting REL? = 1 then a third '{' '}' follows with the current state of the relays
The number depends on the Hardware shields. The Message ends with a CR / LF [0x0d + 0x0a]



or if REL? 1:



Temperature sensor messages always start with an exclamation mark ( ! ), followed by the message ID. Like for the input messages, this ID is displayed in HEX format and iterated with every received message. This is then followed by the bus number in { }. After that, the temperatures are displayed in the next section. They are displayed in °C, with two decimal places and delimited by a comma.



or if TBUS 2:



The temperature sensor addresses connected to a certain bus are displayed in {}. First, the index of the sensor is noted, followed by a * and the address in HEX format afterwards.

Latest Version: Version007.ino (210107)

For older versions and changelog, visit our GitHub repository.