MATLAB Rendition: XBee Test-Sketch


A while ago, I created a post titled ‘XBee Test Sketch’. This was the premise:  you hit a key on keyboard and robot moves in the requested direction. From reading more recent posts, however, you’ll know I am working to set up the MATLAB <–> XBees <–> Robot interface(s); incorporating MATLAB is the next step after setting up the simple XBee <–> Robot interface, which is what the ‘XBee Test Sketch’ Post addressed.

(Scroll to bottom for final code).

Working Through It:

I started with these two lines:

s = serial('COM13', 'BaudRate', 9600, 'Terminator', 'CR', 'StopBit', 1, 'Parity', 'None');

Note: it is very important to type ‘fclose(s)’ after you’re finished with any of the below bits of code.

Continue reading “MATLAB Rendition: XBee Test-Sketch”