New answers tagged

0

there is a driver for the i2c controllers https://github.com/nutki/rpi-nintendo-classic-controller


1

Update: in newer version of BME 280 chip, the track connecting the left and center pads is not between them, but goes up directly to the chip, as you can see in this photo. I succesfully changed the address to 0x77 by cutting that track and connecting the right and central pads.


1

Here are some methods using my Python modules. You can also use the Python smbus module. pigpio import time import pigpio pi = pigpio.pi() h = pi.i2c_open(1, 0x78) pi.i2c_write_device(h, [0xAC]) time.sleep(0.05) (b, d) = pi.i2c_read_device(h, 6) print(d[0], d[1], d[2], d[3], d[4], d[5]) pi.i2c_close(h) pi.stop() rgpio import time import rgpio sbc = ...


0

It's important to clearly show the connections made to devices so we can clearly see which Pi Pin is connected to which device pin. In this case the problem appears to be at the device end. The wires are not connected to the device pins. The header pins may be through the through-hole plating - it does not mean they are connected. You need to solder the ...


0

I have added ADS1015/ADS1115 Python examples for my lgpio and rgpio Python modules. http://abyz.me.uk/lg/download.html They work okay for longer delays. Python lgpio module example. #!/usr/bin/env python import time import lg_ads1x15 import lgpio as sbc adc = lg_ads1x15.ads1115(sbc, 1, 0x48) adc.set_voltage_range(3.3) adc.set_sample_rate(0) # minimum ...


0

If you have a reasonable network controller, you can do this by segmenting the networks and defining routing firewalls. This is pretty easily accomplished using openwrt or any other software defined network capable router. In fact, I do this using zerotier for my web hosting machines - only https connections come to the machines -- if I need to ssh in, it ...


1

Does using an intermediate controller count? Use e.g. Blue Pill, configure both SPIs on it, SPI1 in receive only slave mode, SPI2 in transmit only slave mode. Both RPis will be SPI masters (which is supported). Then you develop a simple firmware which copies data from SPI1 to SPI2. Both SPI on Blue Pill run at up to 18 Mbit/s. P.S. And no, both WiFi and ...


0

The INA219 does not have a maximum measured current, only a maximum measured voltage (26V). I suspect you've run afoul of this annoying recent trend of naming a breakout board the same as the IC it is breaking out. To be clear, this is what an INA219 looks like: And this is what a popular INA219 breakout from Adafruit looks like (the actual INA219 is below ...


0

This article explains how to add another 5 I2C buses, using spare GPIO pins, in addition to the default IC2-1 bus. https://www.instructables.com/Raspberry-PI-Multiple-I2c-Devices/#discuss I was able to add i2c-4 bus in the /boot/config.txt file with: dtoverlay=i2c-gpio,bus=4,i2c_gpio_delay_us=1,i2c_gpio_sda=17,i2c_gpio_scl=27 Reboot and then “sudo i2cdetect -...


2

The SMBus i2c_smbus_read_i2c_block_data() command just does an I2C write as does your open, ioctl and write. It really doesn't matter which you use, it's really a matter of personal taste. Whichever you use I would put a comment in the code saying that the other may be used instead (in case the code is ported to a different environment where only the other ...


0

OK, I've found out what had been wrong here: the two i2c_write_byte_data () methods from pigpio. They send the following signals to the corresponding I²C slave: Start Address WriteBit [A] Register [A] Payload [A] Stop So, after the first byte has been written, a stop bit is emitted, followed by a start bit for the second byte. The ADC looks for a 2-byte ...


Top 50 recent answers are included