Skip to content

Instantly share code, notes, and snippets.

@Richard-Major
Richard-Major / hx711.py
Last active February 20, 2023 01:05 — forked from underdoeg/hx711.py
Python port for RaspberryPI of the HX711 Breakout Board
#!/usr/bin/python3
# Development for reading sparkfun HX711 load cell amp
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
class HX711:
def __init__(self, dout, pd_sck, gain=128, readBits=24):
self.PD_SCK = pd_sck
self.DOUT = dout