This sets the critical temperature to 20°C and the hysteresis to 19°C. After this, if the temperature goes above 20°C the LED on the board will come on and stay on until the temperature drops below 19°C. Notice that you need to run this program with root permissions as it is writing to files in /sys.
In chapter but not in this extract:
Industrial I/O
An Example - The HTU21
The IIO Utilities
The Libiio Library
Summary
The IIO and Hwmon systems are attempt to create drivers that present a standard interface, irrespective of the way that the devices are actually interfaced to the machine.
Hwmon is the older system and was originally intended only for devices that are built into the system rather than discrete devices connected via external buses.
The LM75 Temperature Sensor is often found built in to monitor hardware operating conditions, but it can also be connected via I2C and interfaced using the hwmon driver.
Industrial I/O (IIO) was invented as an extension of Hwmon to create something that could support a wide range of sensors.
IIO has many sophisticated features including triggers that can be used to make regular measurements in kernel space – most drivers don’t support this.
The HTU21 introduced in Chapter 12 has an IIO driver.
There are a set of IIO utilities that you can install but again due to limited driver support many features don’t work.
There is also a more sophisticated library, Libiio, which makes IIO devices easier to work with, but lack of driver support makes it less attractive than working directly with devices.
IBM has released new Granite models that it says provide state-of-the-art performance relative to model size. The Granite 3.0 collection includes a new, instruction-tuned, dense decoder-only LLM.
The Wasmer team has released Wasmer 5.0. The WebAssembly runtime adds experimental support for more back ends including V8, Wasmi and WAMR. It also now has iOS support, and upgraded compilers includin [ ... ]