Bluetooth araba AFmotorShield
#include <AFMotor.h> #include <SoftwareSerial.h> SoftwareSerial bluetooth(9, 10); // RX, TX (Arduino tarafında.) AF_DCMotor motor1(1), motor2(2), motor3(3), motor4(4); byte hiz = 160 ; void setup() { Serial.begin(9600); bluetooth.begin(9600); motor1.setSpeed(hiz); motor2.setSpeed(hiz); motor3.setSpeed(hiz); motor4.setSpeed(hiz); } void loop() { if (bluetooth.available()) { char karakter = bluetooth.read(); // Gelen veriyi karakter değişkenine ata. if (karakter == 'a') { // ileri….