pi4j

Maven project with PI4J library - error in opening zip file

前提是你 提交于 2021-01-27 07:36:49
问题 I've got quite strange problem with pi4j library to Raspberry Pi. I have Maven project in Eclipse and just added repository and dependency for pi4j like this: <repository> <id>oss-snapshots-repo</id> <name>Sonatype OSS Maven Repository</name> <url>https://oss.sonatype.org/content/groups/public</url> <snapshots> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </snapshots> </repository> <dependency> <groupId>com.pi4j</groupId> <artifactId>pi4j-core</artifactId> <version>1.0-SNAPSHOT

Maven project with PI4J library - error in opening zip file

心已入冬 提交于 2021-01-27 07:36:29
问题 I've got quite strange problem with pi4j library to Raspberry Pi. I have Maven project in Eclipse and just added repository and dependency for pi4j like this: <repository> <id>oss-snapshots-repo</id> <name>Sonatype OSS Maven Repository</name> <url>https://oss.sonatype.org/content/groups/public</url> <snapshots> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </snapshots> </repository> <dependency> <groupId>com.pi4j</groupId> <artifactId>pi4j-core</artifactId> <version>1.0-SNAPSHOT

Maven project with PI4J library - error in opening zip file

那年仲夏 提交于 2021-01-27 07:36:28
问题 I've got quite strange problem with pi4j library to Raspberry Pi. I have Maven project in Eclipse and just added repository and dependency for pi4j like this: <repository> <id>oss-snapshots-repo</id> <name>Sonatype OSS Maven Repository</name> <url>https://oss.sonatype.org/content/groups/public</url> <snapshots> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </snapshots> </repository> <dependency> <groupId>com.pi4j</groupId> <artifactId>pi4j-core</artifactId> <version>1.0-SNAPSHOT

read temperature from DHT11, using pi4j

我们两清 提交于 2019-12-20 14:55:10
问题 I'm trying to read temperature data from a DHT11 temperature sensor, using pi4j. I followed the code written in c and python in this site: http://www.uugear.com/portfolio/dht11-h ... or-module/ But it's not working. when I test the instruction 'dht11Pin.getState()' it's always in HIGH state, never changing. Is there anything wrong in my code? Below is my code: import java.util.concurrent.TimeUnit; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import com

用树莓派通过Java实现远程控制电灯

大兔子大兔子 提交于 2019-12-05 00:55:03
用树莓派通过Java实现远程控制电灯 本文章由 亓根火柴 原创,转载请注明出处: http://blog.csdn.net/qigenhuochai/article/details/17661845 传说,女娲娘娘炼就七根火柴,来帮助人类度过第一个冬季,从此,七根火柴散落人间,不见踪迹... 1、前言 科幻电影里电脑特效总是令人兴奋,现在我们自己动手也能实现几个特别好玩的功能。比如说远程控制家里的电灯,虽然这已不是什么稀奇的高科技,而且市面上也有很多智能家居系统,但是有些人就是想自己动手做,我们这里是用Java来进行程序编写的,呵,万能的Java啊 。 先看看 效果演示 吧: http://v.youku.com/v_show/id_XNjU2MTM3MTAw.html 2、 准备工作 在这个教程中要用到树莓派、电脑、继电器、智能手机,下面一一为大家简单介绍一下。 1) 树莓派 我的是树莓派raspberry pi 2代B版,不知道什么是树莓派的请看这里: 树莓派 。(就让我说一句吧:树莓派是时下最流行的卡片式电脑,外形只有信用卡大小,却具有电脑的所有基本功能。开源的 Linux系统 , 1080p 的影片播放。。。)这是我在淘宝上买的(225羊): 2) 电脑 没有显示器或者树莓派没有键盘和鼠标时,可以用电脑对树莓派进行远程命令和桌面控制(ssh和VNC)。具体可以看这里:

read temperature from DHT11, using pi4j

爱⌒轻易说出口 提交于 2019-12-03 03:47:28
I'm trying to read temperature data from a DHT11 temperature sensor, using pi4j. I followed the code written in c and python in this site: http://www.uugear.com/portfolio/dht11-h ... or-module/ But it's not working. when I test the instruction 'dht11Pin.getState()' it's always in HIGH state, never changing. Is there anything wrong in my code? Below is my code: import java.util.concurrent.TimeUnit; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import com.pi4j.component.ObserveableComponentBase; import com.pi4j.io.gpio.GpioController; import com.pi4j.io.gpio