Just got it one functioning today - verified with a cup of ice water and my laser thermometer gun - a lot easier than I thought it would be.
The RasPi is a funny device in that most of the pins have different names. For instance, RasPi Pin 22 is known as GPIO (BCM) 08, CE0 (for SPI, it would be the CS pin).
Quick rundown :
1.) It appears in modern versions of Raspian, the BCM SPI kernal module is already commented out of the blacklist
2.) Grab this badboy : git clone git://github.com/Tuckie/max31855.git
3.) drop the following into a file :
cs_pin = 8
clock_pin = 11
data_pin = 9
units = "f"
thermocouple = MAX31855(cs_pin, clock_pin, data_pin, units)
print(thermocouple.get())
thermocouple.cleanup()
4.) this file just created must be in the same directory as the max31855.py library from the previously GIT'ed repo
5.) Explanation : CS_Pin=8 - this is the BCM / GPIO pin 8 which corresponds to RasPi pin 24
Clock_Pin = 11 - this is the SPIO_SCLK (SPI Clock pin) which is RasPi header pin 23
Data_Pin = 11 - this is the SPIO_MISO (SPI MISO pin) which is RasPi header pin 21
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.