SCR638红外接收管介绍
生活随笔
收集整理的這篇文章主要介紹了
SCR638红外接收管介绍
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
注意:使用的是數(shù)字輸出,不是模擬量輸出
VCC 對應(yīng)電路板上的Power supply,vin的電壓是5V也可以使用
程序:
/* * IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv * An IR detector/demodulator must be connected to the input RECV_PIN. * Version 0.1 July, 2009 * Copyright 2009 Ken Shirriff * http://arcfn.com */ #include <IRremote.h> // IRremote庫聲明 int RECV_PIN = 3; //定義紅外接收器的引腳為11 IRrecv irrecv(RECV_PIN); decode_results results; void setup() { Serial.begin(9600); irrecv.enableIRIn(); // 啟動接收器 } void loop() { if (irrecv.decode(&results)) { Serial.println(results.value, HEX);//以16進制換行輸出接收代碼 irrecv.resume(); // 接收下一個值 } delay(100); }?
轉(zhuǎn)載于:https://www.cnblogs.com/SATinnovation/p/7747627.html
總結(jié)
以上是生活随笔為你收集整理的SCR638红外接收管介绍的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 实验四 恶意代码技术
- 下一篇: Vue.js开发环境搭建的介绍