Hello
I'm now going to read PD_SCK and Dout from Hx711
but i can only get the value from PD_SCK, no value from Dout
here is my code, using NRF52810 and HX711, hope someone can help
#define HX711_SCK BSP_BOARD_LED_3 //11 #define HX711_DOUT BSP_BOARD_LED_4 //12 #define HX711_SCK_ON bsp_board_led_on(BSP_BOARD_LED_3) #define HX711_SCK_OFF bsp_board_led_off(BSP_BOARD_LED_3) #define HX711_DOUT_Read nrf_gpio_pin_read(BSP_BOARD_LED_4) for (;;) { //read HX711 long count = 0; int i; while(HX711_DOUT_Read); HX711_DOUT_Read; for(i = 0; i < 24; i++) { HX711_SCK_ON; count = count << 1; nrf_delay_us(60); HX711_SCK_OFF; nrf_delay_us(60); if(HX711_DOUT_Read) { count++; } } nrf_delay_ms(1); HX711_DOUT_Read; nrf_delay_ms(1); HX711_SCK_ON; if(count & 0x800000) { count |= (long) ~0xffffff; } HX711_SCK_OFF; } }