HariFun #133 - 8 LEDs, 8 Buttons, just 2 Arduino pins!

preview_player
Показать описание
More I/O Madness using the #PCF8574 Eight bit I/O Expander. This time using an #Arduino Nano instead of the #ESP8266

Code is at:

Music credit:
Licensed under Creative Commons: By Attribution 3.0 License
Рекомендации по теме
Комментарии
Автор

Well, thank you! :-) I was born in Jakarta, but have lived in the USA for most of my life. Plus video editing eliminated most of my mistakes. :-)

HariWiguna
Автор

Nice one Hari, clear and to the point! I always enjoy how well you present your wiring, very neat.

Keep up the good work👀

deangreenhough
Автор

Thank you for the clear explanation. I was confused how each pin is an input and output at the same time but now it's clear. Supply and pin are both high with led in the middle as well as a button that pulls to ground. Pushing the button pulls the pin low, but without the button pressed the pin can go low to sink current through the LED

joshuavincent
Автор

For the ExplosionAnimation function, use this instead: for (int i = 0; i < (8 - startAt); i++) ...It's a little messy to continue the loop unnecessarily, particularly when there's a delay() in there.

shanerigsby
Автор

i have a doubt is it necessary to have 8 buttons to work on a shift register
can u reply fast

RDKCREATIONS
Автор

I2c is a proprietary name and if you use it there are some licensing things involved. Thats why they call it wire. Thank you for the videos they have been super helpful with my wire projects

noexpert
Автор

Very Cool hari with just 2 wires I'm Impressed :)

DiyintheGhetto
Автор

I need about 27 inputs from switches (digital). Would you just add more PCF8574s or could you combine with some other pins on an Arduino? Thanks for a great video!!!

paullecat
Автор

I had a lots of fun with the PCF8574, I did it on attiny85 and as well on wemos d1 mini, works well, I added relays on separate PCF8574 as a working unit with your animated leds. With attiny85 I also added Bluetooth or wemos with the wifi so I can switched them using the mobile phone. Work in progress.

cheetahkid
Автор

ciao Hari hai fatto un lavoro veramente magnifico.

lucianodipaolo
Автор

Very clever. You replicated the nodemcu key/led circuitry on gpio16. Never tough of that. Now I'm wondering what can I do with this trick.
BTW, the PCF8574 is the IC in the cheap LCD1602 I2C adaptors. That uses only 4 of the ports. Have seen a couple of shields that use the other 4 ports for key switches. After your previous video I begun wondering if I could use the PCD8574 yo drive a LCD1602 and read a rotary encoders (or two). Would you mind to give it a try?
In any case, thanks for the inspiration.

Автор

so the #PCF8574 work as decoder and incoder in the same time

mohamedb
Автор

This is really a mcp23017 isn't it?

josephtannenbaum
Автор

That's a really inspiring project! I thnk I'll try to use a similar approach to connect some 7-segment displays via a PCF8574 or a MCP23017.

SpiacyLos
Автор

Hi David Farid,
ther is a internal Pullup. Refer to the spec's of the 8547 Output-Config.

franzzerres
Автор

Is it possible to extend it to 80-100 Buttons?? looking forward. thanks for your informational videos.

ameesami
Автор

Hi. How can we modify the circuit so that, when the button is pressed, the LED stays off? I mean, if you were to press the button during reading, the LED will light up the way the circuit is designed, how can we prevent that?

electronz
Автор

short, great explanation ...well done !

noyoo
Автор

What if i want to add another PCF8574 ?

CrazyCoupleDIY
Автор

My question is can you use a pulse at +5v at each switch. Perhaps using a 74hc595 8-bit shift register instead?

rossanderson