MAX31855 Driver
MAX31855 Driver
I made a driver for the MAX31855 thermocouple amplifier. The code is at https://bitbucket.org/thesheep/micropython-max31855
Re: MAX31855 Driver
Hey deshipu the link for the max31855 driver is not working anymore. Does anyone happen to have the raw .py driver file they’d be willing to share with me and/or are aware of another driver that works for the adafruit max31855 thermocouple breakout?
I’d appreciate it!
I’d appreciate it!
Re: MAX31855 Driver
Deshipu's bitbucket is missing heaps of repositories, now that Atlassian has dropped mercurial support.
https://bitbucket.org/blog/sunsetting-m ... -bitbucket
Hi @deshipu, I cloned heaps of your repos, so if you've lost anything, I may have a copy that I can zip and send back.
https://bitbucket.org/blog/sunsetting-m ... -bitbucket
Hi @deshipu, I cloned heaps of your repos, so if you've lost anything, I may have a copy that I can zip and send back.
Re: MAX31855 Driver
Hi guys,
Thanks for all the input here. I'll def check it out.
I was actually to get it to work without a 'real' driver on my ESP31 (MicroPython v1.13) based on this old adafruit document:
https://cdn-learn.adafruit.com/download ... evices.pdf
This works surprisingly well even when I run it in an async application with uasyncio.
Thanks for all the input here. I'll def check it out.
I was actually to get it to work without a 'real' driver on my ESP31 (MicroPython v1.13) based on this old adafruit document:
https://cdn-learn.adafruit.com/download ... evices.pdf
Code: Select all
from machine import Pin, SPI
import time
cs = Pin(13, Pin.OUT)
spi = SPI(-1, baudrate=5000000, polarity=0, phase=0, sck=Pin(5), mosi = Pin(10), miso=Pin(4))
# MOSI has to be defined BUT is not needed to read data
def read_temp(cs, spi):
while True:
try:
data = bytearray(4)
cs.value(0)
spi.readinto(data)
cs.value(1)
print(data)
temp = data[0] << 8 | data[1]
if temp & 0x0001:
return float('NaN')
temp >>= 2
if temp & 0x2000:
temp -= 16384
print(temp * 0.25)
except:
pass
time.sleep(1)
read_temp(cs, spi)
Re: MAX31855 Driver
By the way, all the deleted Bitbucket repos have been archived by Software Heritage, for example: https://bitbucket-archive.softwareherit ... 31855.html
-
- Posts: 4
- Joined: Mon Nov 02, 2020 9:12 am
Re: MAX31855 Driver
Does anyone have a copy of these files. I got the archive version but its made it a py.l file and it looks like a binary. Sorry if this is a stupid question but does anyone know how to use the archive file at https://bitbucket-archive.softwareherit ... ory.tar.gz
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: MAX31855 Driver
I think you've downloaded the wrong file. I can't open this file.
In general under Linux you can just browse to the file with your favourite file manager, double-click on it and it will be opened using archive manager. But it doesn't work for this file which appears empty. I can't answer for Windows or OSX.
In general under Linux you can just browse to the file with your favourite file manager, double-click on it and it will be opened using archive manager. But it doesn't work for this file which appears empty. I can't answer for Windows or OSX.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
-
- Posts: 4
- Joined: Mon Nov 02, 2020 9:12 am
Re: MAX31855 Driver
Thanks for the quick reply. But if i click on the link provided by deshipu and download the repo, thats the file i get. A tar.gz that when i extact has all sorts of off files in it. I think maybe its a Mercurial thing, but not sure how to get the driver out of that file.
Any help appreciated. It looks like all links to this driver are dead.
Any help appreciated. It looks like all links to this driver are dead.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: MAX31855 Driver
That's a puzzler. I can open other tar.gz files with no problem, but not the one you linked which appears empty.
As for the driver I haven't used it. Hopefully someone who has will chip in.
As for the driver I haven't used it. Hopefully someone who has will chip in.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
-
- Posts: 4
- Joined: Mon Nov 02, 2020 9:12 am
Re: MAX31855 Driver
Thanks Peter. there is a .hg folder which might be hidden in linux.
Then under .hg\store\data there is max31855.py.i but no idea what next.
Then under .hg\store\data there is max31855.py.i but no idea what next.