You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you would be so kind as to appropriately format your code and translate the content of your issue into English, there might be someone who could assist you with resolving your problem.
'Please ask, why the event of reading data is not triggered' seems to be your question: As asked we need a translation and single formatted code to help with your implementation. But, I have a DHT22 implementation working, this should be compatible with the DHT11 operation.. Events are not usable with this device. In my readme /* If the commented use of the listener DataInGpioListener, this would
be a more normal implementation. However, the time to idle the gpio from output operation and
re-init the gpio as an input with a listener takes too long to complete
and DHT22 signals are lost and the device attempt to send data fails.
So, for the time being a simple polling implementation is used. */ see https://github.com/Pi4J/pi4j-example-devices/tree/master/src/main/java/com/pi4j/devices/dht22
您好,我用树莓派4b,连接到DTH11温湿度模块上,通过控制微妙数操作读取温湿度失败。具体如下:
public String read(int[] oneData, int poist) {
count = 0;
firstLow = true;
firstHigh = true;
int PIN_LED = poist;
//
StringBuffer result = new StringBuffer("");
//每次读取是上一次的温湿度值,不是本次的值。
int i = 0;
if (oneData == null) {
oneData = new int[40];
}
//
final long start = System.nanoTime();
//
long end = 0;
// //开启事件监听温度过高告警信息
// thListener.actionPerformed(new HumidityEvent(100.01f));
// thListener.actionPerformed(new TemplateEvent(100.01f));
麻烦问下,为何读取数据的事件并未触发?
The text was updated successfully, but these errors were encountered: