SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.

We are attempting to read data in from a K-type thermocouple through a MAX31855K thermocouple breakout board into a Raspberry Pi 3 B+. When we run our Python code, we our only receiving zeros.

One comment to make is that we have soldered the connection between our K-type connectors and the breakout board, but not the wires and the breadboard, which we believe might be part of the issue.

Below is the code:
Code: Select all
import os
import spidev
import Adafruit_GPIO.SPI as SPI
import Adafruit_MAX31855.MAX31855 as MAX31855

# Raspberry Pi software SPI configuration.
CLK = 25
CS  = 24
DO  = 18
sensor = MAX31855.MAX31855(CLK, CS, DO)
# Raspberry Pi hardware SPI configuration.
SPI_PORT   = 0
sensor = MAX31855.MAX31855(spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE, max_speed_hz=5000000))

def c_to_f1 (temp):
    return(temp * (9.0/5.0)) + 32.0
def c_to_f2 (internal):
    return(internal * (9.0/5.0)) + 32.0

print ('Press Ctrl-C to quit.')
while True:
	temp = sensor.readTempC()
	internal = sensor.readInternalC()
	print(('Thermocouple Temperature: {0:0.3F}*C / {1:0.3F}*F').format(temp, c_to_f1(temp)))
	print (('Internal Temperature: {0:0.3F}*C / {1:0.3F}*F').format(internal, c_to_f2(internal)))
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]