HX711 - which lib should I use?

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
likith1268
Posts: 15
Joined: Thu Aug 04, 2022 10:46 am

Re: HX711 - which lib should I use?

Post by likith1268 » Tue Aug 09, 2022 7:36 am

we are using 1kg strain gauge load cell.

likith1268
Posts: 15
Joined: Thu Aug 04, 2022 10:46 am

Re: HX711 - which lib should I use?

Post by likith1268 » Tue Aug 09, 2022 12:12 pm

Thankyou so much for your help, it's all done.

without you may be we can't do it. thanks a lot

kiranmai1268
Posts: 11
Joined: Tue Jul 19, 2022 11:26 am

Re: HX711 - which lib should I use?

Post by kiranmai1268 » Tue Aug 16, 2022 10:11 am

hello again,
I'm new to the python and need some help from you.

actually, we are using 3 stepper motors for 1 pico and for each stepper motor I have independent codes, only difference is the pin number that is (for stepper motor 1 the pin is 2, for stepper motor 2 the pin is 6, for stepper motor 3 the pin is 10)

I want only single code with all these pin numbers and should run all together.

can anyone help me with that.. I am attaching the code below.

Code: Select all

from machine import Pin
from rp2 import PIO, StateMachine, asm_pio
from time import sleep
import sys

@asm_pio(set_init=(PIO.OUT_LOW,) * 4,
         out_init=(PIO.OUT_HIGH,) * 4,
         out_shiftdir=PIO.SHIFT_LEFT)
def prog():
    pull()
    mov(y, osr) # step pattern
    
    pull()
    mov(x, osr) # num steps
    
    jmp(not_x, "end")
    
    label("loop")
    jmp(not_osre, "step") # loop pattern if exhausted
    mov(osr, y)
    
    label("step")
    out(pins, 4) [31]
    nop() [31]
    nop() [31]
    nop() [31]

    jmp(x_dec,"loop")
    label("end")
    set(pins, 8) [31] # 8



sm = StateMachine(0, prog, freq=10000, set_base=Pin(2), out_base=Pin(2))

sm.active(1)
sm.put(2216789025) #1000 0100 0010 0001 1000010000100001
sm.put(1000)
sleep(100)
sm.active(0)
sm.exec("set(pins,0)")

pidou46
Posts: 101
Joined: Sat May 28, 2016 7:01 pm

Re: HX711 - which lib should I use?

Post by pidou46 » Tue Aug 16, 2022 1:34 pm

@kiranmai1268
Welcome to micropython,

Your issue is note related to HX711, and it is specific to pico, you should post pico section of the forum :idea:
nodemcu V2 (amica)
micropython firmware Daily build 05/31/2016

Post Reply