نمایش نتایج: از 1 به 2 از 2
Like Tree1 لایک
  • 1 Post By MOBILEBAZ

موضوع: mobile robot controlled using bluetooth by l- 298 - android

  1. #1
    Member
    تاریخ عضویت
    Sep 2013
    نوشته ها
    78

    mobile robot controlled using bluetooth by l- 298 - android

    با سلام

    برنامه هاي زيادي در اينترنت وجود دارد كه مي شه با برنامه اندرويد يا از طريق بلوتوث يك ماشين يا دو عدد موتور را كنترل كرد فرمانهاي GO - REVERSE- LEFT - RIGHT و همچنين با درايور L 298 N
    لطفا اگر برنامه در اين خصوص داريد به اشتراك بگذاريد
    با تشكر
    در ضمن برنامه نمونه از اينترنت پيدا كردم ولي مي خواهم كه با L 298 N در ارتباط باشه . اگر ممكنه اين برنامه را برام كامل كنيد كه بتونم با درايور هم كار كنه
    با تشكر
    راستش برنامه آپلود نمي شه مجبورم كپي كنم تو ريشه

    5
    کد:
    Smart Car Bluetooth phone control
    Arduino via Bluetooth communication
    <!--[if !vml]--> <!--[endif]--> <!--[if !vml]--> <!--[endif]--> Bluetooth - This name came from
    a tenth-century Danish King Harald Blatand, Blatand meaning in the English language can be
    interpreted as Bluetooth (Bluetooth).
    The so-called Bluetooth (Bluetooth) technology, in fact, is a short-range radio technology, the
    use of "Bluetooth" technology that can effectively simplify PDAs, notebook computers and
    communications mobile phone handsets and other mobile communications terminal equipment,
    but also able to successfully These simplify the communication device and the Internet (Internet)
    between them so that the modern data transmission between the communication device and
    the Internet more quickly and efficiently, to broaden the wireless communication path.
    Because it is the first to deal with the Bluetooth module, today or take a small test chopper,
    make Arduino and pc successfully communicate it. Let's wiring, the board +5 V connection
    Bluetooth VCC, GND motherboard connector Bluetooth-GND, TX motherboard connection
    Bluetooth RX, RX connected Bluetooth TX. After the success of the Bluetooth module
    connected to the power supply and PC, Bluetooth module power indicator flashes green link light
    is lit.
    Here's a look at the program, I let my Arduino receives input "r", the interface is pin13 LED
    flash once, and then output the words keyes.
    Procedures are as follows:
    char val;
    int ledpin = 13;
    void setup ()
    {
    Serial.begin (9600);
    pinMode (ledpin, OUTPUT);
    }
    void loop ()
    {
    val = Serial.read ();
    if (val == 'r')
    {
    digitalWrite (ledpin, HIGH);
    delay ((500);
    digitalWrite (ledpin, LOW);
    delay (500);
    Serial.println ("keyes");
    }
    }
    Here we learn about the Arduino Bluetooth remote control programmable intelligent car. Can
    be controlled via Bluetooth forward, backward, turn left, turn right, etc., simple keys, computer
    and mobile phone two control modes. (Android mobile operating system support 2.3.7
    Above. Computer must own Bluetooth)
    The first time you need to use the car phone with Bluetooth pairing (after the first pairing later
    in the wireless device location would not), see the following first steps:
    1 Turn on Bluetooth Oh I remember the phone, open the Bluetooth software will alert the user
    to open
    2 Then, as shown in the text prompts, connect Bluetooth devices, Bluetooth devices paired
    scans Oh, otherwise you can not connect the car.
    3 matching car, the password is "1234" try it.
    Then it can flourish.
    Arduino Bluetooth remote control programmable smart car program:
    / / *******************************
    int MotorRight1 = 5;
    int MotorRight2 = 6;
    int MotorLeft1 = 10;
    int MotorLeft2 = 11;
    void setup ()
    {
    Serial.begin (9600);
    pinMode (MotorRight1, OUTPUT); / / Pin 8 (PWM)
    pinMode (MotorRight2, OUTPUT); / / Pin 9 (PWM)
    pinMode (MotorLeft1, OUTPUT); / / Pin 10 (PWM)
    pinMode (MotorLeft2, OUTPUT); / / Pin 11 (PWM)
    }
    void go () / / Forward
    {
    digitalWrite (MotorRight1, LOW);
    digitalWrite (MotorRight2, HIGH);
    digitalWrite (MotorLeft1, LOW);
    digitalWrite (MotorLeft2, HIGH);
    }
    void left () / / turn right
    {
    digitalWrite (MotorRight1, HIGH);
    digitalWrite (MotorRight2, LOW);
    digitalWrite (MotorLeft1, LOW);
    digitalWrite (MotorLeft2, HIGH);
    }
    void right () / / turn left
    {
    digitalWrite (MotorRight1, LOW);
    digitalWrite (MotorRight2, HIGH);
    digitalWrite (MotorLeft1, HIGH);
    digitalWrite (MotorLeft2, LOW);
    }
    void stop () / / stop
    {
    digitalWrite (MotorRight1, LOW);
    digitalWrite (MotorRight2, LOW);
    digitalWrite (MotorLeft1, LOW);
    digitalWrite (MotorLeft2, LOW);
    }
    void back () / / Check out
    {
    digitalWrite (MotorRight1, HIGH);
    digitalWrite (MotorRight2, LOW);
    digitalWrite (MotorLeft1, HIGH);
    digitalWrite (MotorLeft2, LOW);;
    }
    void loop ()
    {
    char val = Serial.read ();
    Serial.write (val);
    if (-1! = val) {
    if ('W' == val)
    go ();
    else if ('A' == val)
    left ();
    else if ('D' == val)
    right ();
    else if ('S' == val)
    back ();
    else if ('Q' == val)
    stop ();
    delay (500);
    }
    else
    {
    / / Stop ();
    delay (500);
    }
    }

  2. #2
    Member
    تاریخ عضویت
    Dec 2013
    محل سکونت
    ایران
    نوشته ها
    99
    سلام، لطفا براي نظم بخشيدن به فروم، كدهاي خود را مابين تگ هاي code كپي كنيد.
    برای دیدن سایز بزرگ روی عکس کلیک کنید

نام: Untitled-2.jpg
مشاهده: 120
حجم: 28.7 کیلو بایت

    با تشكر
    لایک کردن
    فروش پروژه کنترل وسایل منزل از راه دور از طریق تلگرام با کمترین هزینه ممکن
    برای اطلاعات بیشتر با تلفن 09369255705 تماس بگیرید.

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •  

SEO by vBSEO