Adafruit Holiday Shipping Deadlines 2018: Attention! Place all UPS 3 Day orders by 11am ET Wednesday 12/13/2018
0

From the Forums: Raspberry Pi – Multiple buttons on one digital pin #piday #Raspberrypi @Raspberry_Pi

NewImage

Thanks to Adafruit forums user jackv for sharing this great Instructables tutorial with us!

If you ever find yourself running out of GPIO pins on a RaspberryPi you can put multiple pushbutton switches on a single pin using this method. It sets a variable by timing the charging of a capacitor through a series of resistors with the switches between them.

You will need a RaspberryPi, a breadboard, and a way to run wires from the RaspberryPi to the breadboard. You can use male/female jumper wires but one of the Pi Cobblers listed on this page from Adafruit will make it a lot easier: http://www.adafruit.com/search?q=cobbler

You will also need:

* This is a very handy assortment of resistors https://www.sparkfun.com/products/10969

This project uses the wiringPi libraries, written by Gordon Henderson, for programming the GPIO in C in a style similar to the Arduino IDE.

wiringPi must be installed.

Instructions for download, install and use are located at http://wiringpi.com

wiringPi uses it’s own pin numbering scheme. All pin numbers mentioned in the program or in the text are wiringPi numbers unless otherwise specified.

After installing wiringPi you can obtain a list showing the pin numbering for your specific model of RaspberryPi by opening a command terminal and typing:

gpio readall

Read more.


Featured Adafruit Products!

NewImage

Adafruit Assembled Pi T-Cobbler Breakout for Raspberry Pi: Now that you’ve finally got your hands on a Raspberry Pi® , you’re probably itching to make some fun embedded computer projects with it. What you need is an assembled add on prototyping Pi T-Cobbler from Adafruit, which can break out all those tasty power, GPIO, I2C and SPI pins from the 26 pin header onto a solderless breadboard. This mini kit will make “cobbling together” prototypes with the Pi super easy. Designed for Raspberry Pi Model B Revision 1 or Revision 2. Designed for use with Raspberry Pi Model B AND Model A, both revisions. This will not work with the Raspberry Pi 2 or Model A+ or B+ If you have one of those, check out our 40-pin version of this item. Read more.


NewImage

0.1uF ceramic capacitors – 10 pack: As any engineer will tell you, 0.1uF ceramic capacitors are the magic fairy dust of electronics – sprinkle them over your circuit schematics for good luck! But seriously, a 0.1uF capacitor right next to the VCC pin of your chips will improve stability by filtering out power supply spikes and noise that can cause flaky behavior. We love these little guys, they have 0.1″ spacing so fit into any perf or breadboard, compact and good quality. We use these exclusively in all our kits, and are always handy for any project or prototype! So useful, we offer them in packs of 10. Read more.


2358Each Friday is PiDay here at Adafruit! Be sure to check out our posts, tutorials and new Raspberry Pi related products. Adafruit has the largest and best selection of Raspberry Pi accessories and all the code & tutorials to get you up and running in no time!


Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, or even use Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for MakeCode, CircuitPython, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.

Join 8,700+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython – Python on Microcontrollers is here!

Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Follow Adafruit on Instagram for top secret new products, behinds the scenes and more https://www.instagram.com/adafruit/


Maker Business — Japanese word working and more in December’s issue of HackSpace magazine!

Wearables — Solder-less magic

Electronics — = != ==.

Biohacking — Finding Bliss with Anandamide

Python for Microcontrollers — sysfs is dead! long live libgpiod! libgpiod for linux & Python running hardware @circuitpython @micropython @ThePSF #Python @Adafruit #Adafruit

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !



No Comments

No comments yet.

Sorry, the comment form is closed at this time.