使用Java进行灯光控制

发布于 2024-11-12 06:59:25 字数 250 浏览 4 评论 0原文

在阅读Eckel的《Thinking in Java》时,我发现了控制Greenhouse的设计。这真的让我震惊,因为他在评论行中提到“这里放置用于控制灯的硬件代码”之类的东西,我想知道 - 我将如何制作如此简单的事情,例如用 Java 控制物理灯或交通灯程序?

如何通过软件控制将灯连接到 PC 并为其供电?

我相信用一些微控制器的汇编语言是可行的,但我还不打算学习汇编语言,所以我想知道是否有可能用Java来做到这一点?

谢谢, M。

when reading Eckel's Thinking in Java, I found design for controlling Greenhouse. It really struck me, since he was mentioning in comment lines "here put the hardware code for controlling light" and stuff, and I want to know - how would I make such a simple thing, as controlling physical light, or traffic light with Java program?

How would I connect light to PC and power it, through software control?

I believe assembly language with some microcontroller is the way, but I do not intend to learn assembly language yet, so I want to know if there's possibility to do this with Java?

Thanks,
M.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

晒暮凉 2024-11-19 06:59:25

另一个示例是 KNX,它的绑定是 openhab

Another example is KNX, a binding for it is part of openhab.

鹿港巷口少年归 2024-11-19 06:59:25

我最近一直在玩 Arduino。编写一个通过串行方式与开发板对话的 Java 程序并不太难,开发板控制电机、LED 等。 Arduino 编程语言非常简单,并且基于 C,因此只要具备一些 Java 知识,这应该很简单。

I've recently been playing around with Arduino. It's not too difficult to write a Java program which talks to the board over serial, with the board controlling motors, leds or the like. The Arduino programming language is quite simple and based on C so with some java knowledge this should be straightforward.

涙—继续流 2024-11-19 06:59:25

几个月前我用谷歌搜索了这个。找到了一个叫做 X10 的东西和这个网站。可能是寻找有关控制灯光等更多信息的开始。

http://x10controller.sourceforge.net/ X10Client/index.html
http://www.x10.com/homepage.htm

I googled this a couple of months ago. Found something called X10 and this site. Might be a start for finding more information about controlling light etc.

http://x10controller.sourceforge.net/X10Client/index.html
http://www.x10.com/homepage.htm

一曲爱恨情仇 2024-11-19 06:59:25

Calimero NG是在java上开发的用于同源控制的API。

Calimero NG is API develop on java for homo control.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文