Hi, I'm trying to use the 74HC595 shift register to get serial input from 2+ sensors and control mosfet. The board I'm using (similar to esp8266-01) only has rx/tx and 1 another gpio pin. So far I got the shift register to control leds using these pins but I'm wondering how I would wire/code it to get data from multiple serial inputs (I'm using ultrasonic sensor with rx & tx data out pins)?
Hi I currently don't have a schematic as I'm still deciding which shift register to use and how to connect them. But I suppose I will need to use something like an 74HC165 or I2C expander to take in sensor inputs. What do you think the best way to this is is so I can also control my mosfet?
I see, so I can use the 74HC165 to expand the sensor inputs. How would I be able to expand the 3 pins I have to also do serial in parallel out to control the LEDS as well? Would the I2C expanders you mentioned be able to this, and how would I connect them? Thanks
Analog pins (except A6 and A7 on Nano) are digital pins with analog input as a special function. You can do anything with an analog pin that you can do with any digital pin.
You can view the changes from 0 to 1 on your serial monitor. You cannot view "data" because you have NO clock timing to tell one 0 from the next or one 1 from the next.
Paul