Contributors

Buttons & Slide Switch

Now we're starting to get to the sensors built into the Circuit Playground. These are parts that are normally not included on an Arduino-like board. They are yours to play with and use as you travel on the path of learning!

Two Pushbuttons

There are two momentary pushbuttons, you can use these in any of your projects to change modes, indicate when to start or stop a sketch, modify behavior, really anything!

The Left button is connected to digital pin #4

The Right button is connected to digital pin #19

Both have 10KΩpull-down resistors. That means that when the button is pressed the value read off those pins will be 'high'. You'll learn more about that later, but its here for your reference

Slide Switch

The slide switch is near the center, right above the JST Battery Jack. There's a little nub you can slide left or right. This switch is connected to digital pin #21. When switched to the left, the value reading is 'high' (thus the + symbol) and when switched right, the value read is 'low' (- symbol).

Library Reference

slideSwitch

You can call CircuitPlayground.slideSwitch() to tell you which way the switch is flipped. It will return true if the switch is to the left (+ side) and false if the switch is to the right (- side)

leftButton and rightButton

You can ask if the buttons are pressed by calling CircuitPlayground.leftButton() or CircuitPlayground.rightButton(). They will return true if and only if the button in question is being pressed right when the function is called.

OUT OF STOCK NOTIFICATION

YOUR NAME

YOUR EMAIL

You have been successfully subscribed to the Notification List for this product and will therefore receive an e-mail from us when it is back in stock!

For security reasons, an e-mail has been sent to you acknowledging your subscription. Please remember that this subscription will not result in you receiving any e-mail from us about anything other than the restocking of this item.

If, for any reason, you would like to unsubscribe from the Notification List for this product you will find details of how to do so in the e-mail that has just been sent to you!