吴忠躺衫网络科技有限公司

電子發燒友App

硬聲App

0
  • 聊天消息
  • 系統消息
  • 評論與回復
登錄后你可以
  • 下載海量資料
  • 學習在線課程
  • 觀看技術視頻
  • 寫文章/發帖/加入社區
會員中心
創作中心

完善資料讓更多小伙伴認識你,還能領取20積分哦,立即完善>

3天內不再提示
電子發燒友網>電子資料下載>電子資料>使用TCS3200和Arduino Uno制作Arduino Chameleon

使用TCS3200和Arduino Uno制作Arduino Chameleon

2022-10-27 | zip | 0.30 MB | 次下載 | 2積分

資料介紹

描述

關于該項目

在這個項目中,我將指導您如何使用 TCS3200 和 Arduino Uno 制作自己的 Arduino Chameleon。有關更多信息以及 Arduino 和 Raspberry Pi 相關項目,

所需零件

  • TCS3200 x 1
  • Arduino Uno x 1
  • 面包板 x 1
  • 很多跳線

需要的軟件

  • Arduino IDE

要遵循的步驟

  • 請參閱下圖了解所有電線連接。
?
pYYBAGNX-gWAG8IoAACGFRgDZeo225.png
Arduino——Tcs3200
?

?

?
poYBAGNX-gmAR73xAADPPFo5ZAs065.png
RGB LED 連接
?
  • 現在只需將以下代碼上傳到您的 Arduino 上即可。
/* 
* Created By Manan Thareja 
* Color sensor using TCS3200 
*/ 
#define S0 3 
#define S1 4 
#define S2 5 
#define S3 6 
#define sensorOut 2 
int green = 9; 
int blue = 10; 
int red  = 11; 
int redfrequency = 0; 
int greenfrequency = 0; 
int bluefrequency = 0; 
void setup() { 
pinMode(S0, OUTPUT); 
 pinMode(S1, OUTPUT); 
 pinMode(S2, OUTPUT); 
 pinMode(S3, OUTPUT); 
 pinMode(sensorOut, INPUT); 
 pinMode(green, OUTPUT); 
 pinMode(blue, OUTPUT); 
 pinMode(red, OUTPUT); 
 // Setting frequency-scaling to 20% 
 digitalWrite(S0,HIGH); 
 digitalWrite(S1,LOW); 
 Serial.begin(9600); 
} 
void loop() { 
 // Setting red filtered photodiodes to be read 
 digitalWrite(S2,LOW); 
 digitalWrite(S3,LOW); 
 // Reading the output frequency 
 redfrequency = pulseIn(sensorOut, LOW); 
 //Remaping the value of the frequency to the RGB Model of 0 to 255 
 redfrequency = map(redfrequency, 25,72,255,0); 
 if (redfrequency > 255) 
 { 
     redfrequency = 255;   
 }   
  else if (redfrequency < 0) 
 { 
     redfrequency = 0;   
 } 
 // Printing the value on the Serial monitor 
 Serial.print("R ");//printing name 
 Serial.print(redfrequency);//printing RED color frequency 
 analogWrite(red, redfrequency); 
 delay(100); 
 // Setting Green filtered photodiodes to be read 
 digitalWrite(S2,HIGH); 
 digitalWrite(S3,HIGH); 
 // Reading the output frequency 
 greenfrequency = pulseIn(sensorOut, LOW); 
 //Remaping the value of the frequency to the RGB Model of 0 to 255 
 greenfrequency = map(greenfrequency, 30,90,255,0); 
 if (greenfrequency > 255) 
 { 
     greenfrequency = 255;   
 }   
 else if (greenfrequency < 0) 
 { 
     greenfrequency = 0;   
 }   
 // Printing the value on the Serial monitor 
 Serial.print(" G ");//printing name 
 Serial.print(greenfrequency);//printing GREEN color frequency 
 analogWrite(green, greenfrequency); 
 delay(100); 
 // Setting Blue filtered photodiodes to be read 
 digitalWrite(S2,LOW); 
 digitalWrite(S3,HIGH); 
 // Reading the output frequency 
 bluefrequency = pulseIn(sensorOut, LOW); 
 //Remaping the value of the frequency to the RGB Model of 0 to 255 
 bluefrequency = map(bluefrequency, 25,70,255,0); 
 if (bluefrequency > 255) 
 { 
     bluefrequency = 255;   
 }   
  else if (bluefrequency < 0) 
 { 
     bluefrequency = 0;   
 }   
 // Printing the value on the Serial monitor 
 Serial.print(" B ");//printing name 
 Serial.print(bluefrequency);//printing BLUE color frequency 
 analogWrite(blue, bluefrequency); 
 Serial.println("  "); 
 delay(100); 

?如果您有任何問題或建議,請隨時將其發布在我們網站論壇頁面的“Arduino Projects”類別中。


下載該資料的人也在下載 下載該資料的人還在閱讀
更多 >

評論

查看更多

下載排行

本周

  1. 1山景DSP芯片AP8248A2數據手冊
  2. 1.06 MB  |  532次下載  |  免費
  3. 2RK3399完整板原理圖(支持平板,盒子VR)
  4. 3.28 MB  |  339次下載  |  免費
  5. 3TC358743XBG評估板參考手冊
  6. 1.36 MB  |  330次下載  |  免費
  7. 4DFM軟件使用教程
  8. 0.84 MB  |  295次下載  |  免費
  9. 5元宇宙深度解析—未來的未來-風口還是泡沫
  10. 6.40 MB  |  227次下載  |  免費
  11. 6迪文DGUS開發指南
  12. 31.67 MB  |  194次下載  |  免費
  13. 7元宇宙底層硬件系列報告
  14. 13.42 MB  |  182次下載  |  免費
  15. 8FP5207XR-G1中文應用手冊
  16. 1.09 MB  |  178次下載  |  免費

本月

  1. 1OrCAD10.5下載OrCAD10.5中文版軟件
  2. 0.00 MB  |  234315次下載  |  免費
  3. 2555集成電路應用800例(新編版)
  4. 0.00 MB  |  33566次下載  |  免費
  5. 3接口電路圖大全
  6. 未知  |  30323次下載  |  免費
  7. 4開關電源設計實例指南
  8. 未知  |  21549次下載  |  免費
  9. 5電氣工程師手冊免費下載(新編第二版pdf電子書)
  10. 0.00 MB  |  15349次下載  |  免費
  11. 6數字電路基礎pdf(下載)
  12. 未知  |  13750次下載  |  免費
  13. 7電子制作實例集錦 下載
  14. 未知  |  8113次下載  |  免費
  15. 8《LED驅動電路設計》 溫德爾著
  16. 0.00 MB  |  6656次下載  |  免費

總榜

  1. 1matlab軟件下載入口
  2. 未知  |  935054次下載  |  免費
  3. 2protel99se軟件下載(可英文版轉中文版)
  4. 78.1 MB  |  537798次下載  |  免費
  5. 3MATLAB 7.1 下載 (含軟件介紹)
  6. 未知  |  420027次下載  |  免費
  7. 4OrCAD10.5下載OrCAD10.5中文版軟件
  8. 0.00 MB  |  234315次下載  |  免費
  9. 5Altium DXP2002下載入口
  10. 未知  |  233046次下載  |  免費
  11. 6電路仿真軟件multisim 10.0免費下載
  12. 340992  |  191187次下載  |  免費
  13. 7十天學會AVR單片機與C語言視頻教程 下載
  14. 158M  |  183279次下載  |  免費
  15. 8proe5.0野火版下載(中文版免費下載)
  16. 未知  |  138040次下載  |  免費
百家乐规律打| 博九网百家乐官网游戏| Bet百家乐娱乐城| 大家赢百家乐投注| 凯斯百家乐官网的玩法技巧和规则| 百家乐官网的规则博彩正网| k7线上娱乐城| 皇冠现金| 大西洋娱乐城开户地址| 威尼斯人娱乐官网| 海立方百家乐的玩法技巧和规则 | 百家乐稳一点的押法| A8百家乐官网娱乐城| 大发888国际游戏平台| 华侨人百家乐的玩法技巧和规则 | 百家乐官网轮盘一体机厂家| AG百家乐官网大转轮| 百家乐官网五种路单规| 伯爵百家乐官网娱乐网| E世博百家乐官网娱乐城| 百家乐官网赢谷输缩| 网页百家乐官网的玩法技巧和规则 | 星期八百家乐官网的玩法技巧和规则| 迪威百家乐官网娱乐| 昭觉县| 妈祖棋牌迷| 皇冠现金投注网| 盛世国际| 在线百家乐官网| 在百家乐官网二庄两闲揽的概率| 百家乐官网游戏平台排名| 新葡京官网| 平南县| 保险百家乐官网怎么玩| 玩百家乐官网技巧巧| 自贡百家乐官网赌场娱乐网规则| 星期8百家乐官网娱乐城| 百家乐投注网中国| 百家乐游戏大小| 大发888更名网址6| 临桂县|