This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

First I2C code on nRF Connect, I think I'm close

Crawling up the learning curve here, doing my best to solve my own problems, but I'm down to just permuting things on this one and I'm not making much progress and all the examples I can find just seem a  little different to what I want to do..
Trying to get an nRF52833 dev kit talking I2C to an eeprom.

Overlay file

&i2c0 {
  compatible = "nordic,nrf-twi";
  status = "okay";
  sda-pin = <26>;
  scl-pin = <27>;
  clock-frequency = <100000>;
   my_eeprom:nRF52833@28 {
     status = "okay";
     reg = <0x28>;
     label = "config_eeprom";
   };
 
};

proj.conf

CONFIG_BT=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_L2CAP_TX_BUF_COUNT=5
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="Woggle"
CONFIG_BT_DEVICE_APPEARANCE=962
CONFIG_HEAP_MEM_POOL_SIZE=2048
CONFIG_I2C=y
CONFIG_GPIO=y
# This example requires more workqueue stack

CONFIG_LOG=y

my code

#define twi0 DT_LABEL(DT_ALIAS(my_eeprom))

voi dmain(void)
{
        int err = 0;

   
    LOG_INF("Starting LiftlogDX\n");

    //init I2C
    const struct device *i2cdev=device_get_binding(twi0);
    i2c_configure(i2cdev, I2C_SPEED_SET(I2C_SPEED_STANDARD));

The Error:
DT_N_ALIAS_my_eeprom_P_label" is undefined 

I feel close, but it's eluding me..
Tips?

Related