The microcontroller used on the Preon32 radio module has a large number of interfaces. These can be used to control both sensors and actuators with different protocols. VIRTENIO offers a VariSen sensor module for the Preon32Shuttle, which has been developed to fit the radio module and contains a large number of sensors for different measured variables.

In this example, a digital sensor for relative illuminance (BH1710FVC) is operated on one of the I2C interfaces. The sensor has a ChipSelect cable to switch it on. The driver allows a configuration, so that in this example a continuous detection of the relative illuminance is set. During the course of the program, temperatures are recorded at intervals of 1000ms and output as pure sensor values as well as values converted into lux.

Copy to Clipboard