License

Public Domain

Recommend Projects

CAR BLUETOOTH V1.0.1

10 months ago 68
  • Description
  • Documents
  • BOM
  • Attachments
  • Members
  • Comments

Description

include

int x; int PW; const int der = 13; const int der1 = 12; const int iz = 11; const int iz1 = 10; const int ledF = 9; const int ledd = 5; const int ledi = 6; boolean y = false; boolean z = false;

void setup() { Serial.begin(9600); pinMode(der, OUTPUT); pinMode(der1, OUTPUT); pinMode(iz, OUTPUT); pinMode(iz1, OUTPUT); pinMode(ledF, OUTPUT); pinMode(ledd, OUTPUT); pinMode(ledi, OUTPUT);

}

void loop() { if (Serial.available() > 0) { x = Serial.read(); } if (x == 10) { Serial.println("CONECTADO"); } if (x == 'B') { digitalWrite(der, HIGH); digitalWrite(iz, HIGH); digitalWrite(der1, LOW); digitalWrite(iz1, LOW); } if (x == 'D') { digitalWrite(der1, HIGH); digitalWrite(iz1, HIGH); digitalWrite(der, LOW); digitalWrite(iz, LOW); LedBack1(); } if (x == 'A') { digitalWrite(iz, HIGH); digitalWrite(iz1, LOW); digitalWrite(der, LOW); digitalWrite(der1, LOW); digitalWrite(ledi, HIGH); } if (x == 'C') { digitalWrite (der, HIGH); digitalWrite (der1, LOW); digitalWrite(iz, LOW); digitalWrite(iz1, LOW); digitalWrite(ledd, HIGH); } if (x == '1' && y == false) { PW = PW + 50; x = 0; } if (x == '1' && y == true) { PW = PW - 50; x = 0; } if (PW > 255) { PW = 255; y = true; } if (PW == 0) { y = false; } if (x == '3' && z == false) { digitalWrite(ledF, HIGH); z = true; x = 0; } if (x == '3' && z == true) { digitalWrite(ledF, LOW); z = false; x = 0; }

} void LedBack1() { digitalWrite(ledi, HIGH); digitalWrite(ledd, HIGH); delay(500); digitalWrite(ledi, LOW); digitalWrite(ledd, LOW); delay(500); }

Documents

Sheet_1

BOM

ID Name Designator Footprint Quantity
1 ATMEGA328P-PU U1 DIP-28_300MIL 1
2 L7805ABV U3 TO-220(TO-220-3) 1
3 1u C1,C2 RAD-0.2 2
4 L293D U4 DIP-16 1
5 1k R2,R3 AXIAL-0.4 2
6 LED-5MM LED1,LED2,LED3,LED4 LED-5MM/2.54 4
7 HC-06 CORDOVA U5 HC-06 CORDOVA 1
8 Header-Male-2.54_1x2 H1,H2,BAT HDR-2X1/2.54 3
9 12MHz X1 OSC-49S-1 1
10 resistencia_v R1 RES-0.25-V 1

Attachments

None

Members

Success
The owner does not allow comments in this project now

Comments (0)

goToTop
你现在访问的是EasyEDA海外版,使用建立访问速度更快的国内版 https://lceda.cn(需要重新注册)
如果需要转移工程请在个人中心 - 工程 - 工程高级设置 - 下载工程,下载后在https://lceda.cn/editor 打开保存即可。
有问题联系QQ 3001956291 不再提醒
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow
We use cookies to offer you a better experience. Detailed information on the use of cookies on this website is provided in our Privacy Policy. By using this site, you consent to the use of our cookies.