Editing SPI bus on Raspberry Pi 4 in device tree - raspberry-pi

I have been looking into adding a 5th wire to the SPI bus. This is essentially a slave ready line. I know that you have to edit the device tree but do I have to edit each SPI dts file or can I just add a new file to the raspberry pi device tree?

Related

How to convert USB to TTL in software?

I'm a totally newbie and interested in physical programming like raspberry pi's. Is there any way to get the data which is intended to go to a "USB to TTL converter device" through USB(e.g. the output of a flashing software), read it and convert it to TTL using Python or C language? I mean something like:
Compiler --> avrdude --> Ethernet port of the compiler host PC --> Ethernet port of a Raspberry Pi --> Pins of the Raspberry Pi --> avr microcontroller
My question is about the code which I should run on the Raspberry Pi to do all the work required on that side. I'm guessing in this specific example it's possible to install avrdude on the Raspberry Pi and pipe the compiled code from the PC to the avrdude on the pi but I'm looking for a general solution that can be used with all microcontrollers, essentially turning the Raspberry Pi into a transparent, Ethernet connected, USB to TTL converter, either existing libraries or directions to how to write such code and where to read the documentations.
Edit1: There's a C language library called pigpio already installed on the Raspberry Pi OS and it can output UART. But I don't know how to read the USB data coming to the Raspberry Pi through its Ethernet port and convert it to UART data.
Edit2: I Changed USB port to Ethernet port since you can't connect two computers directly through USB. The data coming from the PC is still intended for USB to TTL converters since that's how avrdude and similar softwares are written(I guess it'll be "USB over Ethernet").

Bidirectionally communicate a Roomba robot other than a Create model with raspberry pi

I've been trying to communicate different models of Roomba vacuum robots, 9xx and 6xx series, with a raspberry using the sci port of the roomba with no success. The sequence of steps have been:
connect pins 3 (rxd), 4 (txd), and 6 (ground) of the roomba port (5v) with a sparkfun logic level converter.
connect the output (3.3v) from the logic level converter to the gpio of the raspberry pi. Roomba Rxd to rpi txd, roomba txd to pi rxd, ground to ground.
connect rpi 5v to logic level converter HV and at the same time LV to gpio pin 1 (3.3v) for feeding high and low voltage required by the logic level converter.
disable serial console of the rpi
enable serial port hardware of the rpi
install and then open minicom in the rpi using this command
minicom -b 115200 -o -D /dev/serial0
place the roomba in the charging dock
I would now expect to read information about the charging process of the roomba in the minicom console but that's not happening.
Anyone knows if any of those steps is wrong?
My goals are to been able to read robots bump sensors in first place and then control movements of the robot from a pc using the rpi in between.
Thanks for any help.
Check this webseite. it's explaining exactly how to connect the roomba to the raspberry using an logic level converter
https://domoticproject.com/roomberry-surveillance-robot-roomba-raspberry-pi-zero-w-camera/

Ethernet port not working on Raspberry Pi with GPIO pins connected

Raspberry Pi model: 3B
Running Raspbian OS
Recently I bought a Hyperpixel 2.1 round, which uses all of the GPIO ports. Whenever I plug the Raspberry Pi into my network switch, it is unable to connect to the network with the Hyperpixel attached. However, when I removed the Hyperpixel, the Ethernet capability came back.
I'm fairly sure it's a software issue given that there shouldn't be any problems with running all gpio pins in addition to Ethernet.
Is this a quirk with the Raspberry Pi that it doesn't like having all GPIO ports occupied as well as Ethernet? And how would I potentially go about fixing this, perhaps through command line or in the boot config?

Raspberry Pi RTC on i2c-0

I am looking to add a real-time clock to my Raspberry Pi using i2c, but I want to use i2c-0 (GPIO 0 and GPIO 1) rather than i2c-1 (GPIO 2 and GPIO 3). The real-time clock gets detected by the Raspberry Pi, but when I add
dtoverlay=i2c-rtc,ds1307
to /boot/config.txt, it doesn’t say ‘UU’ (in use) instead of the address (68) when using
i2cdetect -y 0
Is there any way of adding something to the config.txt file in order to target the i2c-0 instead of the i2c-1?
I used the Adafruit tutorial in order to add it, but obviously only worked when connecting to the i2c-1 and not i2c-0.

How to interface raspberry pi and Mbed microcontroller using I2c?

I want to interface raspberrp pi and Mbed microcontroller through I2c bus. Both operate at 3.3v, I have connected Rpi SCL ----> mbed SCL, RPI SDA------> mbed SDA, RPI gnd -----> mbed gnd. After connecting all these things I run sudo i2cdetect -y 1 command its does not shows any more address connected to Rpi . Both the modules have internal pull up resistor
...
I²C is a master-slave protocol. That means one devices takes over the role of the master, and one (or multiple) devices connected to the I²C bus act as an I²C device.
In your case it seems like the raspberry pi is working as the master. To put the mbed device into I²C slave mode you have to instantiate one I2CSlave class.
Documentation and a tiny example is on the official site:
https://developer.mbed.org/users/mbed_official/code/mbed/docs/tip/classmbed_1_1I2CSlave.html