java usb技术,做一个USB设备,控制它在Java

I'm thinking about making a physical controller (device?) with knobs, buttons, and LEDs. I'd like to interact with it using Java (respond to the knobs, light up LEDs, etc). The reason I mention Java is two-fold: first, I know Java well1. Second, I've written the rest of the program I need to interface with in Java (though there are ways to talk to the Java program from another language).

I would like the device to connect via USB and be (computer-)platform independent.

I haven't the slightest idea of where to start, except to start reading the Arduino website. Is this my best/only option? Is there something better suited for communicating with Java?

Note: I know that Arduino has something to do with Java (not sure what), but it seems like code must be written in a subset of C.

How would I get moving on this topic?

1 - No laughter, please.

解决方案

The Arduino development environment is written in Java.

But the standard language you write a program for the Arduino platform is effectively C++.

The Arduino platform is based on an Atmel AVR chip. There is at least one Java VM for AVR chips. There are other languages available for the AVR such as Forth and BASIC (although I could only find commercial versions, so I'll if you want to find them, search for "AVR BASIC").

The Arduino uses a virtual COM port to communicate between the host computer and it. A virtual COM port emulates an old style serial line but is done with USB. You can use the Java communication API to then have a Java program running on the host computer communicate with your physical device.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值