从称重传感器ADC驱动模块HX711树莓派中检索数据 [英] retrieving data from load cell ADC driver module HX711 raspberry pi

查看:591
本文介绍了从称重传感器ADC驱动模块HX711树莓派中检索数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从模块中获取数据。
如果有人试图从HX711模块中检索数据,那么b
$ b我不知道地址寄存器adc。

I want to take the data from the module.
if anyone has ever tried to retrieve the data from the HX711 module?
I do not know the address register of the adc.

推荐答案

我试试这个, 

i try this, 

string aqs = SpiDevice.GetDeviceSelector();

string aqs = SpiDevice.GetDeviceSelector();

            var dis = await DeviceInformation.FindAllAsync(aqs);



            var settings = new SpiConnectionSettings(0);



            settings.Mode = SpiMode.Mode1;



            settings.ClockFrequency = 500000;



            SpiDevice device = await SpiDevice.FromIdAsync(dis [0] .Id,settings);



            byte [] data = new byte [3];



            device.Read(data);

            var dis = await DeviceInformation.FindAllAsync(aqs);

            var settings = new SpiConnectionSettings(0);

            settings.Mode = SpiMode.Mode1;

            settings.ClockFrequency = 500000;

            SpiDevice device = await SpiDevice.FromIdAsync(dis[0].Id, settings);

            byte[] data = new byte[3];

            device.Read(data);

有错误

它说  " ; 'await'运算符只能在异步方法中使用。考虑使用'async'修饰符标记此方法并将其返回类型更改为'Task'。
cobaloadcell"

it say "The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'. cobaloadcell"




这篇关于从称重传感器ADC驱动模块HX711树莓派中检索数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆