from gpiozero import LED
#we are using the LED sub-module just as a generic output
fan = LED(18) #for the positive, put the negative in one of the grounds
def cputemp():
f = open("/sys/class/thermal/thermal_zone0/temp")
CPUTemp = f.read()
f.close()
StringToOutput= str(int(CPUTemp)/1000)
while True:
cputemp()
if StringToOutput >= 45:
fan.on()
elif StringToOutput < 45:
fan.off
This is some fairly simple code that gets the temperature from /sys/class/thermal/thermal_zone0/temp in thousandths Celsius divides by 1000 for Celsius and checks if it is more than 45. if it is it turns the "fan" on and if not , it stays off. But you'll almost certainly never need a fan as long as you're not doing anything stupid.
This code was adapted from a SE question but i am not sure which.
findJAR.com is a search engine for JAR files and Java classes. It helps Java Developers to resolve NoClassDefFoundError and ClassNotFoundException problems. findJAR.com is based on the extensive ibiblio maven repository.
Europass brings together into a single framework several existing tools for the transparency of diplomas, certificates and competences. Helping citizens to better communicate and present their qualifications and skills throughout Europe, Europass will promote both occupational mobility, between countries as well as across sectors, and mobility for learning purposes.
Thinking how to make Windows 7 Faster? There are many tweaks to Speed Up Windows 7.So, here is how to get the maximum speed out of it. Apart from tweaks there are many other crucial settings too for boosting windows 7 performance. Here are them.
Don't waste your afternoon drawing UML sequence diagrams. Just enter the description, and this online tool will draw it for you. It can emulate the look of many other popular tools.
As you know and most probably have already downloaded the latest redsn0w 0.9.7b1, the new redsn0w lets you untethered jailbreak your iOS devices which were
The Ultimate App finder for iPhone, iPod and iPad ! Find everything freely : Cracked applications from Cydia, News, Tests and Tutorials
PRADO is a component-based and event-driven framework for Web application development in PHP 5.
Developing USB Device Drivers from Userspace using Libusb Linux Tutorials, HOWTO's & Reference Material
Programming Guide for Linux USB Device Drivers