You are here: Commands (Alphabetical)

PBASIC Command Reference

For all BASIC Stamp models

(Alphabetical Listing)

 

 

2 Note: For BS1/BS2-compatible commands, syntax shown below is in BS2 format. Some commands may use slightly different formatting with the BS1.
2.5 Note: Requires {$PBASIC 2.5} directive.
Note: Compound, multi-line command; syntax not shown.
Note: Command is accepted by the 24-pin BS2p, BS2pe, and BS2px, but only the 40-pin BS2p40 gives access to the auxiliary I/O pins.

 

  AUXIO   AUXIO
  BRANCH2   BRANCH Offset, [Address1, Address2, ...AddressN]
  BUTTON   BUTTON Pin, DownState, Delay, Rate, Workspace, TargetState, Address
  COMPARE   COMPARE Mode, Result
  CONFIGPIN   CONFIGPIN Mode, PinMask
  COUNT   COUNT Pin, Duration, Variable
  DATA   {Symbol } DATA DataItem {, DataItem, ...}
  DEBUG   DEBUG OutputData {, OutputData}
  DEBUGIN2.5   DEBUGIN InputData
  DO…LOOP2.5   DO {WHILE | UNTILCondition(s) } ... LOOP {UNTIL | WHILECondition(s) }
  DTMFOUT   DTMFOUT Pin, {OnTime, OffTime, } [Tone {, Tone, ...}]
  EEPROM   EEPROM {Location,} (DataItem {, DataItem, ...})
  END   END
  EXIT2.5   EXIT
  FOR…NEXT   FOR Counter = StartValue TO EndValue {STEP StepValue} ... NEXT
  FREQOUT   FREQOUT Pin, Duration, Freq1 {, Freq2 }
  GET   GET Location, {Word2.5} Variable {, ...} 2.5
  GOSUB   GOSUB Address
  GOTO   GOTO Address
  HIGH   HIGH Pin
  I2CIN   I2CIN Pin, SlaveID, {Address {\LowAddress },} [InputData]
  I2COUT   I2COUT Pin, SlaveID, {Address {\LowAddress},} [OutputData]
  IF…THEN   IF >Condition THEN Address
  IF…THEN…ELSE2.5, †    
  INPUT   INPUT Pin
  IOTERM   IOTERM Port
  LCDCMD   LCDCMD Pin, Command
  LCDIN   LCDIN Pin, Command, [InputData]
  LCDOUT   LCDOUT Pin, Command, [OutputData]
  LET   {LET} Variable = Value
  LOOKDOWN2   LOOKDOWN Target, {ComparisonOp }[Value0, Value1, ...ValueN], Variable
  LOOKUP2   LOOKUP Index, [Value0, Value1, ...ValueN], Variable
  LOW   LOW Pin
  MAINIO   MAINIO
  NAP   NAPDuration
  ON...GOSUB2.5   ON Offset GOSUB Address1, Address2, ...AddressN
  ON...GOTO2.5   ON Offset GOTO Address1, Address2, ...AddressN
  OUTPUT   OUTPUT Pin
  OWIN   OWIN Pin, Mode, [InputData]
  OWOUT   OWOUT Pin, Mode, [OutputData]
  PAUSE   PAUSE Duration
  POLLIN   POLLIN Pin, State
  POLLMODE   POLLMODE Mode
  POLLOUT   POLLOUT Pin, State
  POLLRUN   POLLRUN ProgramSlot
  POLLWAIT   POLLWAIT Duration
  POT   POT Pin, Scale, Variable
  PULSIN   PULSIN Pin, State, Variable
  PULSOUT   PULSOUT Pin, Duration
  PUT   PUT Location, {Word 2.5} Variable {, ...} 2.5
  PWM   PWM Pin, Duty, Duration
  RANDOM   RANDOM Variable
  RCTIME   RCTIME Pin, State, Variable
  READ   READ Location, {Word 2.5} Variable {, ...} 2.5
  RETURN   RETURN
  REVERSE   REVERSE Pin
  RUN   RUN ProgramSlot
  SELECT...CASE2.5, †    
  SERIN2   SERIN Rpin {\Fpin}, Baudmode, {Plabel,} {Timeout, Tlabel, } [InputData]
  SEROUT2   SEROUT Tpin {\Fpin}, Baudmode, {Pace,} {Timeout, Tlabel,} [OutputData]
  SHIFTIN   SHIFTIN Dpin, Cpin, Mode, [Variable{\Bits} {, Variable{\Bits}...}]
  SHIFTOUT   SHIFTOUT Dpin, Cpin, Mode, [OutputData{\Bits} {, OutputData{\Bits}...}]
  SLEEP   SLEEP Duration
  SOUND   SOUND Pin, (Note, Duration {, Note, Duration...})
  STOP   STOP
  STORE   STORE ProgramSlot
  TOGGLE   TOGGLE Pin
  WRITE   WRITE Location, {Word 2.5} Value {, ...} 2.5
  XOUT   XOUT Mpin, Zpin, [House\Command {\Cycles} {, House\Command {\Cycles}...}]

 

Go to PBASIC Language home page

Open Getting Started with Stamps in Class

Open Connection Troubleshooting

BASIC Stamp Help Version 2.5.4

Copyright © Parallax Inc.

8/21/2013