Chapter 2

Programming in PBASIC

In This Chapter

arrow Discovering the essentials of the PBASIC language

arrow Working with variables and constants

arrow Adding IF-THEN-ELSE logic to your programs

arrow Looping with DO and FOR loops

This chapter is about the exciting but somewhat intimidating topic of computer programming. Specifically, it covers programming the BASIC Stamp microprocessor (which we introduce in Chapter 1 of this minibook) using its built-in programming language called PBASIC.

This journey into programming is fascinating but may seem rocky at times, because you need to grasp certain important concepts, which can be difficult to get your head around. But trust us: programming a BASIC Stamp microprocessor isn’t rocket science. You can and will get to grips with the tricky ideas, and when you do your imagination is the only limit to what you can get a BASIC Stamp microprocessor to do.

So grab your thinking cap, check in the mirror that it fits and you look suitably sharp, and get started.

tip.eps PBASIC ...

Get Electronics All-in-One For Dummies, UK Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.