i2c

write()ing to i2c device: Operation not permitted

荒凉一梦 提交于 2021-02-10 18:10:33
问题 So I have 2 PCA9555 (16 channel digital I/O) chips connected to a small embedded device running Linux over i2c. The PCA9555 devices have 7 bit addresses 0100000 and 0100001. When I power up the board, I run: # modprobe i2c-i801 # modprobe i2c-dev # i2cdetect -l i2c-0 smbus SMBus I801 adapter at 0500 SMBus adapter # i2cdump -y -r 0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- ... (Same for every line) 70: -- -- -- -- -- -- -- # dmesg|tail i801_smbus 0000:00:1f.3

I2C connection between Windows IOT and Arduino Nano using C#

谁说我不能喝 提交于 2021-02-08 07:46:32
问题 I'm pretty new in the world of Raspberry and Arduino (especially together with Windows IoT). My plan is, to readout different sensors (temp and pressure) with the Arduino and then sending the values to my RP2 where I can use them on a GUI. So, it's not a problem to readout the sensors. I receive the correct values. Afterwards I'm sending them to the I²C bus (based on the requirements of the Wire.h lib). For my RP2 I found two similar projects and my code in C# is based on those. So far, so

How to pass I2C addresses to Adafruit CircuitPython code? (Running ADS1115)

梦想的初衷 提交于 2021-01-28 11:42:42
问题 I'm trying to run two Adafruit ADS1115s off of one Raspberry Pi, using two I2C addresses (0x48, 0x49). The address for each device can be set by tying the ADDR pin high (0x49) or leaving it floating (default, 0x48). I've confirmed that each board works when the address is set to 0x48, and running "i2cdetect 1" confirms that both boards are connected at the correct addresses. I can successfully run this sample code My question is this: How do I get the code to read from I2C address 0x49

ESP8266 I2C slave does not acknowledge data

你。 提交于 2021-01-28 04:20:26
问题 I have a TM4C123 processor acting as a I2C master and a ESP8266 as a slave. For the ESP I am using the Arduino IDE with ESP8266 support installed at version 2.5.2, which should support the I2C slave mode. However, I can't get it to work. Even with the Arduino slave_receiver example, the slave does not acknowledge (ACK) the master's requests which I am displaying on a scope. To make sure I am using the right address at least once, I implemented an address sweep on the master. And to make sure

Xilinx AXI-IIC Slave Protocol description

白昼怎懂夜的黑 提交于 2021-01-27 18:10:14
问题 I am trying to get the Xilinx AXI IIC-Core example to work, which can be found at C:\Xilinx\14.7\ISE_DS\EDK\sw\XilinxProcessorIPLib\drivers\iic_v2_08_a\examples\xiic_slave_example.c . Has anyone experiences with this core? I found this pg090 axi iic description, which says that Standard communication on the bus between a master and a slave is composed of four parts: - START - Slave Address - Data Transfer - STOP But when I transmit an write transfer, both address and message where accepted

undefined reference to `i2c_smbus_read_word_data(int, unsigned char)

不打扰是莪最后的温柔 提交于 2021-01-02 05:56:06
问题 After updating to Ubuntu 18.04 I can't compile my Qt application. The following error occurs: undefined reference to `i2c_smbus_read_word_data(int, unsigned char) As I understood, i2c_smbus_read_word_data is now defined not in linux/i2c-dev.h, but in dynamic library /usr/lib/x86_64-linux-gnu/libi2c.so. I tryed to link dynamically: -li2c and statically: /usr/lib/x86_64-linux-gnu/libi2c.a But I still have compillation error UPD: libi2c-dev, libi2c0 and i2c-tools packages are installed. 回答1: The

how to make i2c-core as module

久未见 提交于 2020-08-10 19:20:21
问题 Hello I have beagleboneblack board and have kernel source code I want to make my i2c work as a module so for that, I have done some changes in .config file # # I2C support # CONFIG_I2C=m and cross compile kernel make dtbs zImage -j8 CROSS_COMPILE=arm-linux-gnueabihf- But after compile successfully, CONFIG_I2C change from 'm' to 'y' how to solve this problem? 来源: https://stackoverflow.com/questions/62752609/how-to-make-i2c-core-as-module

How to get data from I2C device BH1750 over USB-I2C module in Python3?

大兔子大兔子 提交于 2020-07-30 12:36:03
问题 I am Linux user and I have those devices: USB-I2C convertor: https://www.robot-electronics.co.uk/htm/usb_i2c_tech.htm GY-30 I2C module: https://5.imimg.com/data5/TY/AK/MY-1833510/gy-30-bh1750-intensity-digital-light-sensor-module.pdf And GY-30 is with BH1750 Ambient light sensor: https://www.mylms.cz/wp-content/uploads/2017/07/bh1750-datasheet.pdf I need to read Luxs from BH1750 over virtual serial port in Python3, but I am not sure how to do it. I ended with something like this: import

温度传感器+I2C+串口+PC上位机(pyserial)例子

情到浓时终转凉″ 提交于 2020-04-14 04:23:09
【今日推荐】:为什么一到面试就懵逼!>>> 温度传感器+I2C+串口+PC上位机(pyserial)例子 例子写的有点乱,主要是学习: 温度传感器DS18b20,E2PROM,I2C, 串口读写,PC上位机(pyserial)数据显示 SerialPort.py PC串口上位机程序,可以设定上限报警温度 需要安装Python3以上,pyserial库,例子在Python3.4下写的。 上位机传给单片机上限报警温度后,单片机存入E2PROM, 单片机断电重启后,从E2PROM读取报警值。 i2c.h I2C总线读写和设定 lcd1602.h lcd1602的读写和设定 temp_ds18b20.h DS18b20的读写和设定 #define AT24C02 0xa0 // AT24C02 写数据的设备地址 #define MAX_TEMP_E2PROM_FLAG 0xff // 上限报警温度的存储器数据标志,存在说明存储器有数据 sbit power_port = P2^3; // 报警端口 int max_temp = 340; // 报警上限温度,默认340 int max_temp_buf = 0; // 报警上限温度缓存,用于串口 int sp_read_count = 0; // 串口数据,读取的字节计数 bit sp_read_flag = 0; // 串口读取标志