Skip to content

Instantly share code, notes, and snippets.

@nivhty
nivhty / thinkfan.conf
Last active November 4, 2021 09:08
Thinkfan X1C6 new yaml configuration /etc/thinkfan.conf
sensors:
- hwmon: /sys/devices/platform/coretemp.0/hwmon/
indices: [1, 2, 3, 4, 5]
fans:
- tpacpi: /proc/acpi/ibm/fan
levels:
- [0, 0, 40]
- [1, 40, 47]
- [2, 47, 50]
@nivhty
nivhty / air_index_to_lcd.py
Last active August 18, 2020 04:34
Python to script to use the SDS011 air quality sensor and outputting to a 16x2 I2C LCD
#!/usr/bin/python -u
# coding=utf-8
# "DATASHEET": http://cl.ly/ekot
#AQI
from __future__ import print_function, division
import serial, struct, sys, time, json, subprocess, smbus
DEBUG = 0
CMD_MODE = 2