1 / 3

Current Works

Current Works. Downloaded XBee API firmware Was Freezing because correct setting was not selected Performed A/D conversion on all 4 XBee pins Set XBee to automatically perform A/D conversions every millisecond Researched XBee API framing setup to determine how to parse frames

liesel
Download Presentation

Current Works

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Current Works • Downloaded XBee API firmware • Was Freezing because correct setting was not selected • Performed A/D conversion on all 4 XBee pins • Set XBee to automatically perform A/D conversions every millisecond • Researched XBee API framing setup to determine how to parse frames • Began implementing parse code in MATLAB • Having difficulty getting MATLAB to continuously read whole frames • Implemented a function to wait for start sequence of a frame; Current code works fine for around 170 frames and then bytes are shifted • See next slide • Initial testing performed with IMU • Output voltage around 1.4 volts when stationary • Determined resistor values for voltage divider

  2. Matlab • firstbyte=fread(serobjw, 1) • while(firstbyte~=126)%first byte needs to be 126 • firstbyte=fread(serobjw, 1); • end • i=0; • values=[0;1;2;3]%create vector • while(i<2000) • bytes=serobjw.BytesAvailable; • if(bytes>28)%wait until 56 bytes read • ret = fread(serobjw, 56);%frame is 56 bytes • v0=[ret(47) ret(48)]; • v1=[ret(49) ret(50)]; • v2=[ret(51) ret(52)]; • v3=[ret(53) ret(54)]; • newvalues=[v0; v1; v2; v3;]; • values=[values newvalues]; • end • i=i+1; • end • Need to add timer instead of just looping as fast as possible

  3. What’s Next? • Continue testing of accelerometer and gyroscope output of IMU • Connect 2 accelerometers and 1 gyroscope to XBee with voltage dividers (could be used with Planar motion) • Continue work on MATLAB code for parsing XBee frames • Research other A/D conversion chips/microprocessors • Should be used in final version to read output from third accelerometer and is more precise

More Related