Download presentation
Presentation is loading. Please wait.
Published byNeil McCormick Modified over 9 years ago
2
The iBlueBot By Walid Mnif, Tamer Shadid, Lim Seang FINAL PRESENTATION ECE4006 07/24/2003
3
Project Goals l Primary goal: control an amigo bot using an iPaq through a Bluetooth link l Secondary goal: send feedback from robot and PIC sensors to be displayed on the iPaq DONE
4
The Current iPAQ GUI Create a virtual port And connect serially To the AmigoBot Search for the bot And establish a Bluetooth link Rotate left Rotate right Go forwardStop button Steering Controls Speed Control Status Panel
5
Bluetooth Implementation on iPAQ l BTAccess C++ library for accessing the Widcomm Bluetooth Protocol Stack built in the iPAQ Sample functionality: CBtStack *pStack; // create pointer to stack CBtDevice *pDevice; //create device pointer pStack->BtRadioOn(); CString name=pDevice->m_strDeviceName;
6
Control Protocol l One byte is transferred for each control command: - The upper nibble defines the command type - The lower nibble contains the command parameter l Multi threads implemented: - A sender thread: sends one byte to converter after each button push - A receiver thread: monitor the serial port for any arriving packets
7
The PICs Setup l PIC1 - Interrupts routine when receives data from converter via UART - Transfer data via SPI to PIC2 - Send acknowledgment to the iPAK - Read PIC2 SPI buffer around mainloop and forward to iPAQ l PIC2 - Interrupts when it receives data from PIC1 via SPI - Analyze data and send control packets to Amigobot via UART
8
The Amigobot Controls l The Amigobot has a Built-in AmigoOS that receives and transmits data packets - A series of initialization packets must be sent to the Amigobot to establish an active line of communication - Commands must be sent periodically to so that the WatchDog timer on the robot does not expire and thus disabling the motors
9
The Amigobot Controls l Sample Command: unsigned char TXcommand[] = {0xFA,0xFB,0x06,0x20,0x3B,0x05,0x05,0x25,0x40}; The HeaderThe number of data bits + 2The command issuedPositive, signed or stringThe parameter associated with the commandThe checksum l Checksum calculation: CSUML = TXcommand[4] + TXcommand[6]; if(TXcommand[4] > CSUML){//check if carry bit CSUMH = 1 + TXcommand[3] + TXcommand[5];}//endif else{ CSUMH = TXcommand[3] + TXcommand[5];}//endelse TXcommand[7] = CSUMH; TXcommand[8] = CSUML;
10
Encountered Problems l The Bluetooth Converter: - The RTS and CTS pins of its UART have to be grounded for it to be able to send - It has to be connected to the iPAQ before it is connected to the PIC - When the PIC is first turned on, if it is connected to the converter, its memory is erased l The circuitry had to be rebuild because the PICs were blown out. l One of the PICs had an earlier version of Quikbug that didn’t allow it to interact correctly with converter
11
Possible enhancement l With the full duplex communication all ready implemented, any device could be appended to the PICs and send data wirelessly to the iPAQ - Suggested devices: Camera, Heat sensors l Implement Bluetooth on other Amigobots and have them interact in order to accomplish an assigned task
12
Updated Gant Chart Accomplished Remaining Added
13
Questions?
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.