private void readrawAsync(LinearHX hx711b, TextBox tb) { uint r; while (true) { r = hx711b.read(); } }
public MainPage() { this.InitializeComponent(); gpio = GpioController.GetDefault(); slk = gpio.OpenPin(SLK_PIN); dout = gpio.OpenPin(DOUT_PIN); hx711b = new LinearHX(dout, slk, 128); hx711b.power_down(); Debug.WriteLine("down"); hx711b.power_up(); Debug.WriteLine("up"); hx711b.setParameters(BEST_OFFSET, BEST_SCALE); txt_offset.Text = BEST_OFFSET.ToString(); txt_scale.Text = BEST_SCALE.ToString(); }