View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
MATLAB Support Package for Parallax BASIC Stamp

Be the first to rate this file! 2 Downloads (last 30 days) File Size: 775 KB File ID: #32329 Version:
image thumbnail

MATLAB Support Package for Parallax BASIC Stamp



25 Jul 2011 (Updated )

MATLAB library for communicating with a BASIC Stamp 2 and Board of Education (BoE) kit

| Watch this File

File Information

The Parallax BASIC Stamp 2 (BS2) is a low-cost single-board microcontroller useful for electronics projects. It is available as part of a "Board of Education" (BoE) kit that includes a solderless prototyping board, I/O pins and serial connectivity.
This MATLAB Support Package allows you to to communicate with a BS2 over a serial port, and is specifically intended for use with the Board of Education. It consists of a MATLAB API on the host computer and a PBASIC server program that runs on the BS2. With this support package, you can:
  * Communicate with BS2 from the MATLAB command line
  * Read and write to the BS2 digital pins
  * Output PWM, DTMF and X10 signals
  * Measure pulse widths and digital state changes
The support package DOES NOT require any knowledge of PBASIC.

Sample usage:

 % create the BASIC Stamp object
 bs = stamp.BasicStamp('COM4');

 % set the I/O state of pin 3 (0=output, 1=input)
 bs.setState(3, 0)

 % access digital state
 bs.writePin(3,0) % set pin 3 to 0
 bs.readPin(4) % read pin 4

 % get the duration of a high pulse on pin 4
 bs.recvPulse(4, 1)

 % send a 200 microsecond high pulse on pin 3

 % send a pseudo-PWM waveform with a
 % duty cycle of 10% and duration of 30ms
 bs.outputPWM(3, 0.1, 30)

 % clean up

MATLAB release MATLAB 7.8 (R2009a)
Other requirements Supports Windows, Mac OS X and Linux
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
18 Dec 2013 Vincent

I want to use outputSine to output a frequency of 38.5kHz for the IR LED, but it says that this frequency is too high. Is there another way to output a 38.5kHz signal? Thanks!

Comment only
04 Aug 2011 1.1

Updated README.pdf

22 Aug 2011 1.2

Fixed hyperlinks in README.pdf, and added image

01 Sep 2016

Updated license

Contact us