I am connecting a 74ls151 to rpi 3 and what to use it as a demultiplexer for switching mpu6050 on/off.
Can the 74ls151 be used as demultiplexer?
No it cannot be used as it does not have a bi-directional mechanism. It can be used to multiple between devices that send data to the raspberry pi or arduino, but it cannot receive any data or voltage from the raspberry pi or arduino. So, it is uni-directional.
Related
I am trying to build a smart home.
I have some Esps to control the peripherals
And I want to use the raspberry Pi as the hub/webserver
The pi would host a website to allow the controls.
I am not sure how to put it all together.
The MCU lib can itself host html.
Any suggestions.
if raspbery pi and esp8266 run in LAN. Thats can communicate via TCP and UDP. UDP is boardcast protocol so it can be reach multiple esp8266 at the same time even if yo dont know ip address of esp8266s. But there is no response for security. TCP is unicast protocol. You have to know esp8266s ip address for using is. You can use UDP for take esp8266 ip address after then you can communate esp8266s via TCP.
if raspberry pi and esp8266 communicate via internet you can use MQTT.
i suggest you learn how create server by using raspberry pi (maybe apache or others) and develop scripts on raspberry pi for using TCP, UDP, MQTT. Also you should study to delevop program for esp8266s.
As per, rpi3 device tree, it has two spi buses i.e spi0 and spi1. spi0 bus supports 2 chip select [spi0.0, spi0.1] and spi1 bus supports 3 chip select[spi1.0, spi1.1, spi1.2] pins. All these can be configured in config.txt using dtoverlay.
Now my rpi3 uses spi0.1 for touchscreen interface. I dont want to use spi0.0 because it may cause bus contention. So i need to connect my other peripheral on spi1.x bus.
When i am querying rpi3 for spi buses using getSpiBusList(), the ouput is [SPI0.0, SPI0.1]
How do i get around this issue?
Note:- Using android things 0.7-devpreview
According Raspberry Pi I/O pinout there is only SPI0.0 and SPI0.1 SPI buses pins, so you can't use SPI1.? bus even if you configure it in config.txt.
I want to connect the module HC05 (with UART protocol) to Raspberry pi and see the receiving result on wxwidgets (code-blocks GUI).
where can i write UART code in wxwidgets?
How can i write each protocol in wxwidgets?
wxWidgets doesn't provide a uniform API for communicating with serial ports, as explained here.
The Raspberry Pi is typically running a Linux distribution where serial ports are exposed as special device files such as /dev/stty0. Consult your favorite Linux/Raspberry Pi documentation for information on how to configure serial port parameters. Once configured, just read/write to the file in order to communicate with whatever devices is attached to the port.
I recently try to use Lidar Lite v3 with my Rpi 3, and it works with I2C communication. My wiring method is due to offical documentation. Wiring picture However, what I have learned before is that the gpio pin of RPI can only afford 3.3v working voltage. My Question is that shouldn't I add the resistor in my circuit to prevent from breaking out the pins of my RPI ?
I am working on stm32f401 nucleo boards and I want to communicate 2 boards each others with uart for sending speech.
I am using Nucleo-CCA02M1 mems microphone kits. Should I use which one? RS422 or RS485 for a full dublex communication? Are there any example about that for helping?
Thank you.
If you want to use RS422 or RS485, you will need converter board to change uart to RS422 or RS485. Also, you do not need make any modification on your uart code to use any of them. These communication protocals are related with hardware. Uart, RS232, RS422 and RS485 are all serial communication. You can use any uart code for them.