极客工坊

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8719|回复: 2

我想问使用IRremote库进行红外发射都默认在端口3是不是不可以修改的啊

[复制链接]
发表于 2013-1-30 14:13:49 | 显示全部楼层 |阅读模式
我想问使用IRremote库进行红外发射都默认在端口3是不是不可以修改的啊,看帮助文档也没写,请各位高手指教
回复

使用道具 举报

发表于 2013-1-30 19:31:56 | 显示全部楼层
你可以44,我最近也在看红外

不过官网上说,红外接收可以是任意数字电,发射好像只能是Pin 3

原文
For output, connect an IR LED and appropriate resistor to PWM output pin 3. Make sure the polarity of the LED is correct, or it won't illuminate - the long lead is positive. I used a NTE 3027 LED (because that's what was handy) and 100 ohm resistor; the range is about 15 feet. For additional range, you can amplify the output with a transistor.
回复 支持 反对

使用道具 举报

发表于 2013-1-30 19:34:44 | 显示全部楼层
发错了,是这段

The transmission code is straightforward. To ensure accurate output frequencies and duty cycles, I use the PWM timer, rather than delay loops to modulate the output LED at the appropriate frequency. (See my Arduino PWM Secrets article for more details on the PWM timers.) At the low level, enableIROut sets up the timer for PWM output on pin 3 at the proper frequency. The mark() method sends a mark by enabling PWM output and delaying the specified time. The space() method sends a space by disabling PWM output and delaying the specified time.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则 需要先绑定手机号

Archiver|联系我们|极客工坊

GMT+8, 2024-5-3 12:28 , Processed in 0.042595 second(s), 18 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表