Category : i2c

So, say I open one sensor using an init(const char *fd) type function, create an object, and run for ex: sensor1.init("/dev/i2c-1") with an input of my 1st sensor location. Then I create a 2nd object and run the same function with another sensor ex. sensor2.init("/dev/i2c-2"). When I use either object to call my other class ..

Read more

I know that having an arduino with multiple slave addresses is impossible, however i wish to have an arduino that starts out at address A, and if a condition is met switch to address B instead. So not multiple slave addresses, since they’d be one at a time. I simply wish to change it in ..

Read more

Please find the below code snippet and let me know that ways to troubleshoot. #include <stdbool.h> #include <stdint.h> #include <stdarg.h> #include "inc/hw_i2c.h" #include "inc/hw_memmap.h" #include "inc/hw_types.h" #include "inc/hw_ints.h" #include "driverlib/gpio.h" #include "driverlib/i2c.h" #include "driverlib/interrupt.h" #include "driverlib/pin_map.h" #include "driverlib/sysctl.h" #include "driverlib/uart.h" #include "utils/uartstdio.h" #include "driverlib/gpio.h" #define SLAVEADDRESS_EXT 0x65 #define NUM_OF_I2CBYTES 255 #define reg_noOp 0x00 #define reg_decodeMode ..

Read more