Skip to main content

Example: MCP3008 A/D Converter Connected via SPI to Control an LM35 Temperature Sensor

Product: CODESYS Control for Raspberry Pi

The MCP3008_Temperature.project project shows an application which reads an analog temperature sensor (LM35) via SPI, which is connected to an A/D converter chip (MCP3008). The MCP3008 can evaluate 8 analog channels, but in this example only one is used.

For more information, see: Configuring A/D Converter MPC3008

Note

_example_icon.png After the installation of CODESYS Control for Raspberry Pi, the sample project is located in the CODESYS Control for Raspberry Pi installation directory, in the Examples directory.

System requirements and restrictions

Programming system

CODESYS Development System (version 3.5.18.0 or higher)

Runtime system

CODESYS Control for Raspberry Pi (version 4.5.0.0 or higher)

Add-on components

MCP3008 A/D converter, LM35 temperature sensor