<acronym id="s8ci2"><small id="s8ci2"></small></acronym>
<rt id="s8ci2"></rt><rt id="s8ci2"><optgroup id="s8ci2"></optgroup></rt>
<acronym id="s8ci2"></acronym>
<acronym id="s8ci2"><center id="s8ci2"></center></acronym>

電子發燒友App

硬聲App

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

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

3天內不再提示
電子發燒友網>電子資料下載>電子資料>Bit Duino一體式機器人防護罩

Bit Duino一體式機器人防護罩

2022-07-12 | zip | 0.11 MB | 次下載 | 免費

資料介紹


PCB圖如下:
pYYBAGLHrZGAbE-qAACOqzr1FOk867.png

成分

針排接頭公 - 母 1x40 2.54mm × 1
排針 × 2
L293d驅動IC × 1
DIP 插座 28/16 針 × 1
2Pin 螺絲端子 5mm 間距 × 3
電阻封裝
PCBway
× 1
開關套件通孔
PCBway
× 1
LED 套件。
PCBway
× 1
單刀雙擲
DIYhz商店
× 1

描述

Bit-Duino 一體式機器人防護罩

這個 Arduino Uno 開發板是為初學者設計的,他們可以嘗試使用參考代碼進行自我編程。他們可以輕松地使用參考代碼并創建他們的項目!使用它,您可以控制兩個電機和兩個伺服電機。你的想象力是你唯一的限制!使用它,您可以學習如何使用一些傳感器,并且可以從頭開始創建自己的項目!

如何給盾牌加電。

您可以使用任何類型的電池,這是您的選擇。確保它們位于電池外殼中,并且有兩根電線分別為負極和正極。螺釘端子在這里用作連接器。

poYBAGLHraOAG6gWAADCX13oJ5k752.png

工作電壓 - 7 至 9V

連接傳感器和模塊。

poYBAGLHraaABbrDAAC6NXqktN8629.png

讓我們了解每個組件以及它們的用途,

L293D IC - 用于控制兩個電機。

LED -作為電源指示燈。

1k 電阻- 降低 LED 的電壓和電流

公針頭 -要將屏蔽連接到 Arduino,連接伺服電機,并連接傳感器。

母針頭- 連接傳感器,連接額外的針腳。

SPDT 開關- 打開/關閉屏蔽。

按鈕 -重置代碼。

螺絲端子- 連接電源線,連接輸出電機線。

參考代碼'

代碼隨#define 和伺服庫一起提供。

?

#include  
#define motor1 4 
#define motor2 5 
#define motor3 6 
#define motor4 7
伺服.servo1;
伺服.servo2;
#define tx 0 
#define rx 1 
#define trig 2 
#define echo 8 
#define pir_out 3 
#define temp 11 
#define ir1 A0 
#define ir2 A1 
#define sda A4 
#define scl A5 
void  setup ()  {
? //把你的設置代碼在這里,運行一次: 
?servo1.attach( 9 );
?伺服2.attach(10);

}

void  loop ()  {
? // 把你的主要代碼放在這里,重復運行:

}

?

如果您想控制伺服電機,請將其放入格式和每個程序中。

?

#include <伺服.h>
伺服.servo1;
伺服.servo2;
void  setup ()  {
? // 把你的設置代碼放在這里,運行一次: 
?servo1.attach( 9 );
?伺服2.attach(10);

}

void  loop ()  {
? // 把你的主要代碼放在這里,重復運行:

}

?

電機控制代碼。

?

#define motor1 4 
#define motor2 5 
#define motor3 6 
#define motor4 7 
#define tx 0 
#define rx 1 
#define trig 2 
#define echo 8 
#define pir_out 3 
#define temp 11 
#define ir1 A0 
#define ir2 A1 
#define sda A4 
#define scl A5 
void  setup ()  {
? // 把你的設置代碼放在這里,運行一次:
pinMode(電機1,輸出)
pinMode(電機2,輸出)
pinMode(電機3,輸出)
pinMode(motor4,OUTPUT)//告訴arduino電機引腳是輸出/它們是控制引腳。
}

void  loop ()  {
? // 把你的主要代碼放在這里,重復運行:
?//1st motor forward/backward code
數字寫入(電機1,高)
digitalWrite(motor2,LOW)//沿一個方向運行第一個電機(將電機連接到螺釘端子并查看它的旋轉位置,如果向前旋轉則向前旋轉,如果向后旋轉則向后旋轉)

數字寫入(電機 1,低)
digitalWrite(motor2,HIGH)//根據上面的代碼以相反的方向運行第一個電機。
//

//第二個電機前進/后退代碼
數字寫入(電機 3,高)
digitalWrite(motor4,LOW)//沿一個方向運行第二個電機(將電機連接到螺釘端子并查看它的旋轉位置,如果向前旋轉則向前旋轉,如果向后旋轉則向后旋轉)

數字寫入(電機 3,低)
digitalWrite(motor4,HIGH)//根據上面的代碼以相反的方向運行第二個電機。
//

//第一個電機停止代碼
數字寫入(電機 1,低)
digitalWrite(motor2, LOW) //停止第一個電機。
//

//第二個電機停止代碼
數字寫入(電機 3,低)
digitalWrite(motor4, LOW) //停止第二個電機。
//

//要轉彎,你應該讓一個輪子停止和一個運行,然后記錄它的轉彎位置。然后你可以創建一個名為“turn *the side turn*”的函數并在你的項目中使用它。使功能向前(所有兩個輪子都向前運行),向后(所有兩個輪子都向后運行),停止(所有兩個輪子都停止)并在您的項目中使用它們。
}

?

超聲波距離傳感器代碼

?

#define motor1 4 
#define motor2 5 
#define motor3 6 
#define motor4 7 
#define tx 0 
#define rx 1 
#define trig 2 
#define echo 8 
#define pir_out 3 
#define temp 11 
#define ir1 A0 
#define ir2 A1 
#define sda A4 
#define scl A5 
void  setup ()  {
? // 把你的設置代碼放在這里,運行一次: 
pinMode(trig,OUTPUT); //設置引腳觸發輸出
pinMode(echo,INPUT); //設置pin echo到輸入
}

void  loop ()  {
? // 把你的主要代碼放在這里,重復運行:
?數字寫入(觸發,低);
?延遲微秒(2);
?數字寫入(觸發,高);
?延遲微秒(2);
?數字寫入(觸發,低);
長t = 脈沖輸入(回聲,高);// 啟動傳感器

長英寸 = t / 74 / 2 ;
長cm = t / 29 / 2 ; // 獲取實際的 in/cm 值

if (cm< 10 ){
? //如果傳感器檢測到距離它不到 10cm 的物體*sensor*,則無論您在此處編寫什么程序都會運行??梢詫⑸厦娴摹?”替換為任意符號,使其為“小于”、“等于”、“等于或小于”或“等于或大于”。
}

}?

?

PIR 傳感器代碼

?

#define motor1 4 
#define motor2 5 
#define motor3 6 
#define motor4 7 
#define tx 0 
#define rx 1 
#define trig 2 
#define echo 8 
#define pir_out 3 
#define temp 11 
#define ir1 A0 
#define ir2 A1 
#define sda A4 
#define scl A5 
void  setup ()  {
? // 把你的設置代碼放在這里,運行一次:
?pinMode(pir_out,輸入);
}

void  loop ()  {
? // 把你的主要代碼放在這里,重復運行:
int val = digitalRead(pir_out);

if (val == 1 ){
? //在這里放一個函數,當傳感器檢測到運動時它將運行。
}
if (val == 0 ){
? //在這里放一個函數,當傳感器沒有檢測到任何運動時它就會運行。
}
}

?

HC-05/HC-06藍牙模塊代碼(存收號)

?

字符;
#define motor1 4 
#define motor2 5 
#define motor3 6 
#define motor4 7 
#define tx 0 
#define rx 1 
#define trig 2 
#define echo 8 
#define pir_out 3 
#define temp 11 
#define ir1 A0 
#define ir2 A1 
#define sda A4 
#define scl A5 
void  setup () {
? // 把你的設置代碼放在這里,運行一次: 
Serial.begin( 9600 );
}

void  loop () {
? // 把你的主要代碼放在這里,重復運行:
if (Serial.available()){
?ble = Serial.read();
??
}
if (ble == ' //你要通過藍牙發送的任何數字' ){
? //當藍牙模塊檢測到給定的數字時,你在這里編碼的任何東西都會運行。僅支持數字,需要智能手機發送信號。您可以使用任何 android Arduino 藍牙控制應用程序并使用下面的代碼測試信號。請記住在上傳代碼時刪除藍牙模塊并在上傳完成后重新連接。否則代碼不會上傳,否則會嚴重損壞您的藍牙模塊。?
}
}

?

要通過藍牙存儲和接收字符,請訪問https://forum.arduino.cc/t/receiving-text-strings-over-bluetooth/232452

有關其他傳感器代碼,請訪問https://forum.arduino.cc

如果您是 Arduino 編程的初學者,請訪問https://www.arduino.cc/en/Guide/

始終使用“#define 和伺服庫”。當你用這個構建一些東西時的代碼。

我為什么做這個?

我這樣做是因為當我還是初學者時,我很難使用其他類型的電機控制器。所以問題是,

做大項目時總是忘記別針。

很多將 Arduino 連接到傳感器的電線非?;靵y。

沒有專用的傳感器連接器。

沒有內置開關,這總是意味著要在外部連接一個。

所以在這個板上,我已經消除了所有這些問題。

我可以用這個板做什么樣的項目?

各種項目!喜歡

避障車

線跟車

運動感應自動皂液器等等!想象力是你唯一的限制!

需要注意的是,

焊接時,將 Arduino Uno 公針焊接在 PCB 下方,以便它們可以用作屏蔽。例如:-pYYBAGLHrcqALDvSAA71Y6rZDEI401.png

您應該知道如何對 Arduino Uno 進行編程(例如:制作一個函數)

您可以選擇將傳感器和模塊引腳與母頭/公頭連接。

焊接元件后,剪掉多余的部分。

如果您想更換 IC,請使用 IC 插座底座

不得轉載,僅用于您的工作。

DP 代表 DigitalPin

溫度傳感器輸出 DP 為 11

TEMP代表溫度傳感器(DHT11模塊)

UDS代表超聲波距離傳感器

BT1代表藍牙模塊(兼容HC-05、HC-06 4pin模塊)

數字紅外是一種紅外傳感器。

PIR 是被動紅外傳感器/運動傳感器。

使用 LCD 顯示模塊時使用 I2C 轉換器。poYBAGLHrdGAZYg3AACv_xzb7qo822.jpg

代碼

位duino_define_and_servo_code

Bit-duino_define_and_servo_code.ino

C/C++

下載(3)

? #include
? #define motor1 4
? #define motor2 5
? #define motor3 6
? #define motor4 7
? Servo.servo1;
? Servo.servo2;
? #define tx 0
? #define rx 1
? #define trig 2
? #define echo 8
? #define pir_out 3
? #define temp 11
? #define ir1 A0
? #define ir2 A1
? #define sda A4
? #define scl A5
? void setup() {
? // put your setup code here, to run once:
? servo1.attach(9);
? servo2.attach(10);
? ?
? }
? ?
? void loop() {
? // put your main code here, to run repeatedly:
? ?
? }

電機控制

C/C++

? #include
? #define motor1 4
? #define motor2 5
? #define motor3 6
? #define motor4 7
? Servo.servo1;
? Servo.servo2;
? #define tx 0
? #define rx 1
? #define trig 2
? #define echo 8
? #define pir_out 3
? #define temp 11
? #define ir1 A0
? #define ir2 A1
? #define sda A4
? #define scl A5
? void setup() {
? // put your setup code here, to run once:
? servo1.attach(9);
? servo2.attach(10);
? pinMode(motor1, OUTPUT)
? pinMode(motor2, OUTPUT)
? pinMode(motor3, OUTPUT)
? pinMode(motor4, OUTPUT)// telling arduino that the motor pins are output/they are the controlling pins.
? }
? ?
? void loop() {
? // put your main code here, to run repeatedly:
? //1st motor forward/backward code
? digitalWrite(motor1, HIGH)
? digitalWrite(motor2, LOW)// runs the 1st motor in a direction (connct the motor to the screw terminal and see where it is rotating, if rotating forward it is forward, if rotating backward it is backward)
? ?
? digitalWrite(motor1, LOW)
? digitalWrite(motor2, HIGH)// runs the 1st motor in the opposite direction according to the above piece of code.
? //
? ?
? //2nd motor forward/backward code
? digitalWrite(motor3, HIGH)
? digitalWrite(motor4, LOW)// runs the 2nd motor in a direction (connct the motor to the screw terminal and see where it is rotating, if rotating forward it is forward, if rotating backward it is backward)
? ?
? digitalWrite(motor3, LOW)
? digitalWrite(motor4, HIGH)// runs the 2nd motor in the opposite direction according to the above piece of code.
? //
? ?
? //1st motor stop code
? digitalWrite(motor1, LOW)
? digitalWrite(motor2, LOW)//stops the 1st motor.
? //
? ?
? //2nd motor stop code
? digitalWrite(motor3, LOW)
? digitalWrite(motor4, LOW)//stops the 2nd motor.
? //
? ?
? //to turn you should make one wheel stop and one running, and then record where its turning. then you can make a function called "turn *the side turned*" and use it on your project. make functions to forward(all two wheels running forward), backward (all two wheels running backward), stop( all two wheels stop) and use them on your project.
? }

Ultrasonic_Distance_Sensor_code

C/C++

? #define motor1 4
? #define motor2 5
? #define motor3 6
? #define motor4 7
? #define tx 0
? #define rx 1
? #define trig 2
? #define echo 8
? #define pir_out 3
? #define temp 11
? #define ir1 A0
? #define ir2 A1
? #define sda A4
? #define scl A5
? void setup() {
? // put your setup code here, to run once:
? pinMode(trig,OUTPUT);//setting pin trig to output
? pinMode(echo,INPUT);//setting pin echo to input
? }
? ?
? void loop() {
? // put your main code here, to run repeatedly:
? digitalWrite(trig,LOW);
? delayMicroseconds(2);
? digitalWrite(trig,HIGH);
? delayMicroseconds(2);
? digitalWrite(trig,LOW);
? long t = pulseIn(echo, HIGH);// starting the sensor
? ?
? long inches = t / 74 / 2;
? long cm = t / 29 / 2; // getiing the real in/cm value
? ?
? if(cm<10){
? //whatever you program here will run if the sensor detects something less than 10cm away from it*sensor*. can replace the above "<" with any symbol and make it "less than", "equal", "equal or less than" or "equal or greater than".
? }
? ?
? }

PIR_sensor_code

C/C++

? #define motor1 4
? #define motor2 5
? #define motor3 6
? #define motor4 7
? #define tx 0
? #define rx 1
? #define trig 2
? #define echo 8
? #define pir_out 3
? #define temp 11
? #define ir1 A0
? #define ir2 A1
? #define sda A4
? #define scl A5
? void setup() {
? // put your setup code here, to run once:
? pinMode(pir_out, INPUT);
? }
? ?
? void loop() {
? // put your main code here, to run repeatedly:
? int val = digitalRead(pir_out);
? ?
? if (val == 1){
? //put a function here and it will run when sensor detects motion.
? }
? if (val == 0){
? //put a function here and it will run when sensor doesn't detect any motion.
? }
? }

Bluetooth_HC-06_module_receiving_numbers_code

C/C++

? char ble;
? #define motor1 4
? #define motor2 5
? #define motor3 6
? #define motor4 7
? #define tx 0
? #define rx 1
? #define trig 2
? #define echo 8
? #define pir_out 3
? #define temp 11
? #define ir1 A0
? #define ir2 A1
? #define sda A4
? #define scl A5
? void setup() {
? // put your setup code here, to run once:
? Serial.begin(9600);
? }
? ?
? void loop() {
? // put your main code here, to run repeatedly:
? if(Serial.available()){
? ble = Serial.read();
? ?
? }
? if (ble == ' //any number you are going to send through bluetooth '){
? //anything you code here gonna run when bluetooth module detects the given number. only numbers supported and requires smartphone to send signals. you can use any android Arduino Bluetooth control app and test the signal using the code below. remember when uploading the code remove the bluetooth module and reconnect it when the uploading is finished. or else the code is not gonna upload or it can severely damage your bluetooth module.
? }
? }

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

評論

查看更多

下載排行

本周

  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次下載  |  免費
亚洲欧美日韩精品久久_久久精品AⅤ无码中文_日本中文字幕有码在线播放_亚洲视频高清不卡在线观看
<acronym id="s8ci2"><small id="s8ci2"></small></acronym>
<rt id="s8ci2"></rt><rt id="s8ci2"><optgroup id="s8ci2"></optgroup></rt>
<acronym id="s8ci2"></acronym>
<acronym id="s8ci2"><center id="s8ci2"></center></acronym>