<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>reading data from a sensor that has no driver using TWI</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/86436/reading-data-from-a-sensor-that-has-no-driver-using-twi</link><description>Hello, I am trying to read data from the sensor using I2C, I have the nrf9160 on an Icarus board https://www.actinius.com/icarus . 
 I tried following this guide: https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/peripherals/posts/twi-ic2</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Apr 2022 09:09:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/86436/reading-data-from-a-sensor-that-has-no-driver-using-twi" /><item><title>RE: reading data from a sensor that has no driver using TWI</title><link>https://devzone.nordicsemi.com/thread/364875?ContentTypeID=1</link><pubDate>Tue, 26 Apr 2022 09:09:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7acee3a9-c2f5-4f94-b2e7-5eb8739d23d4</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Sorry for the slow response, I have been out of office for the last couple of weeks.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you still having issues with this? If anything has changed, maybe you could give me a status update?&lt;/p&gt;
&lt;p&gt;I downloaded the datasheet, but there doesn&amp;#39;t seem to be a description of the instruction set. Can this be found somewhere else?&lt;br /&gt;If you have a link to a description of the instruction set, can you send me that also?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: reading data from a sensor that has no driver using TWI</title><link>https://devzone.nordicsemi.com/thread/362588?ContentTypeID=1</link><pubDate>Fri, 08 Apr 2022 12:18:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8407244-fae7-4e2e-ab6f-6c1cb48e8d7f</guid><dc:creator>Saed</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;they all return 0, here is the D&lt;a href="https://sensirion.com/media/documents/4EAF6AF8/61652C3C/Sensirion_CO2_Sensors_SCD30_Datasheet.pdf"&gt;atasheet&amp;nbsp;&lt;/a&gt;&amp;nbsp;and unfortunately, I don&amp;#39;t have an analyzer at the moment&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: reading data from a sensor that has no driver using TWI</title><link>https://devzone.nordicsemi.com/thread/362558?ContentTypeID=1</link><pubDate>Fri, 08 Apr 2022 11:06:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef0af9e1-fd8d-4caa-8003-a7d19811c663</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Could you check the return code of the various i2c function calls to see if they run successfully?&amp;nbsp;&lt;br /&gt;If they return something other than 0 it meant something went wrong in the call to the function.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In particular the calls to i2c_write(), i2c_read() or i2c_write_read().&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you able to check with a scope or logic analyzer what is happening on the I2C bus?&lt;/p&gt;
&lt;p&gt;Do you have a datasheet you can share for the sensor, so I can have a look at it?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: reading data from a sensor that has no driver using TWI</title><link>https://devzone.nordicsemi.com/thread/362043?ContentTypeID=1</link><pubDate>Wed, 06 Apr 2022 10:42:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d20f6f79-9beb-4a8f-992f-91f29ece12a5</guid><dc:creator>Saed</dc:creator><description>&lt;p&gt;Here is another example of the problem&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;void main(void)
{
	


	uint16_t twi_test_cnt = MSG_EXCHANGE_CNT;
	bool led_is_on = true;
	uint32_t ret;

	led_dev = device_get_binding(LED0);
	if (led_dev == NULL)
	{
		return;
	}

	ret = gpio_pin_configure(led_dev, PIN, GPIO_OUTPUT_ACTIVE | FLAGS);
	if (ret &amp;lt; 0)
	{
		return;
	}
	k_msleep(2000);
	int	incr = 0 ;
	int rtn_code = 5;

	twim_init();
	printk(&amp;quot;\n&amp;quot;); 
	printk(&amp;quot;\n-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-\n&amp;quot;); 
	printk(&amp;quot;\n&amp;quot;); 
    k_msleep(2000);
	i2c_write(nrfx_twis_dev1,softRest,2,DT_REG_ADDR(DT_NODELABEL(twis_device1)) )	;
	k_msleep(2000);
	i2c_write(nrfx_twis_dev1,activateASC,4,DT_REG_ADDR(DT_NODELABEL(twis_device1)) );
	k_msleep(2000);
	i2c_write(nrfx_twis_dev1,getASC,2,DT_REG_ADDR(DT_NODELABEL(twis_device1)) );
	k_msleep(2000);
	i2c_read(nrfx_twis_dev1, i2c_rx_buffer, sizeof(i2c_rx_buffer), DT_REG_ADDR( DT_NODELABEL(twis_device1) ) );
	while (incr &amp;lt;4)
			printk(&amp;quot;| 0x%.2x |&amp;quot;, i2c_rx_buffer[incr++]);
	printk(&amp;quot;\n&amp;quot;); 
	printk(&amp;quot;\n-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-\n&amp;quot;); 
	printk(&amp;quot;\n&amp;quot;); 

	incr = 0 ;
	k_msleep(2000);
	i2c_write_read(nrfx_twis_dev1, DT_REG_ADDR(DT_NODELABEL(twis_device1)),getASC,2,i2c_rx_buffer,18);
	while (incr&amp;lt; 4)
			printk(&amp;quot;| 0x%.2x |&amp;quot;, i2c_rx_buffer[incr++]);
	printk(&amp;quot;\n&amp;quot;); 
	printk(&amp;quot;\n-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-\n&amp;quot;); 
	printk(&amp;quot;\n&amp;quot;); 
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;in this code I try to activate ASC: AUTO SELF CALIBRATION, I send the command to activate it then I send the command to get the ASC Status (both ways) and it returns 0 meaning it is not active&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/17646.png" /&gt;&lt;/p&gt;
&lt;p&gt;I have no clue how is this happening?!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: reading data from a sensor that has no driver using TWI</title><link>https://devzone.nordicsemi.com/thread/362029?ContentTypeID=1</link><pubDate>Wed, 06 Apr 2022 10:08:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aeb8952a-3c47-4128-8e59-926dbeac8481</guid><dc:creator>Saed</dc:creator><description>&lt;p&gt;Hi, in the code I posted you can see that I have I2c_write_read() commented, that is because I tried using it as well, did not work with any command, however, I was able to &lt;a href="https://sensirion.com/media/documents/D7CEEF4A/6165372F/Sensirion_CO2_Sensors_SCD30_Interface_Description.pdf"&gt;get the frameware version&lt;/a&gt;&amp;nbsp;---&amp;gt;&amp;nbsp;page 17&amp;nbsp;using separate I2C_write() then read, according to the scd30 Zephyr example:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://github.com/Sensirion/embedded-common/blob/1ac7c72c895d230c6f1375865f3b7161ce6b665a/hw_i2c/sample-implementations/zephyr_user_space/sensirion_hw_i2c_implementation.c"&gt;https://github.com/Sensirion/embedded-common/blob/1ac7c72c895d230c6f1375865f3b7161ce6b665a/hw_i2c/sample-implementations/zephyr_user_space/sensirion_hw_i2c_implementation.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;when trying to write (&lt;a href="https://sensirion.com/media/documents/D7CEEF4A/6165372F/Sensirion_CO2_Sensors_SCD30_Interface_Description.pdf"&gt;Get measurement interval&lt;/a&gt;&amp;nbsp;for example (page9)&amp;nbsp; )&amp;nbsp;I always get the deafult interval for the sensor which is 2 sec, although I just used command (set Interval) to change it 4 sec!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;when trying to get ( dataReady) it always returns 0&amp;nbsp; although I have already sent (triggerContinuous Measurement&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t understand where is the problem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: reading data from a sensor that has no driver using TWI</title><link>https://devzone.nordicsemi.com/thread/361976?ContentTypeID=1</link><pubDate>Wed, 06 Apr 2022 07:49:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da2817bb-357d-4c8e-b6f1-b7869c640bf3</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Assuming your sensor expects a typical write -&amp;gt; repeated start -&amp;gt; read pattern where you first write the command and then immediately read out the response, then you should use the &lt;a href="https://docs.zephyrproject.org/latest/reference/peripherals/i2c.html#c.i2c_write_read"&gt;i2c_write_read(..)&lt;/a&gt; function.&lt;/p&gt;
&lt;p&gt;Issuing separate i2c_write(..) and i2c_read(..) calls will most likely not have the same effect, since they will be interpreted by the sensor as two separate commands.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: reading data from a sensor that has no driver using TWI</title><link>https://devzone.nordicsemi.com/thread/361757?ContentTypeID=1</link><pubDate>Tue, 05 Apr 2022 08:34:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e665866d-1a17-4ad4-8228-bf38a468f109</guid><dc:creator>Saed</dc:creator><description>&lt;p&gt;hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have attached a new code where I write commands to the sensor to start the measurement and get results, unfortunately, all that I get is 0xff 0xff 0xac&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/*
 * Copyright (c) 2016 Intel Corporation
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include &amp;lt;device.h&amp;gt;
#include &amp;lt;devicetree.h&amp;gt;
#include &amp;lt;drivers/gpio.h&amp;gt;
#include &amp;lt;drivers/i2c.h&amp;gt;
#include &amp;lt;sys/printk.h&amp;gt;
#include &amp;lt;zephyr.h&amp;gt;



/* 1000 msec = 1 sec */
#define SLEEP_TIME_MS 10000

/* The devicetree node identifier for the &amp;quot;led0&amp;quot; alias. */
#define LED0_NODE DT_ALIAS(led0)

const struct device *led_dev;

#if DT_NODE_HAS_STATUS(LED0_NODE, okay)
#define LED0 DT_GPIO_LABEL(LED0_NODE, gpios)
#define PIN DT_GPIO_PIN(LED0_NODE, gpios)
#define FLAGS DT_GPIO_FLAGS(LED0_NODE, gpios)
#else
/* A build error here means your board isn&amp;#39;t set up to blink an LED. */
#error &amp;quot;Unsupported board: led0 devicetree alias is not defined&amp;quot;
#define LED0 &amp;quot;&amp;quot;
#define PIN 0
#define FLAGS 0
#endif

////////////////////////////////////////////////////////////

// TWI Test Configuration

////////////////////////////////////////////////////////////

#define ECHO_WRITES true
#define MSG_EXCHANGE_CNT 5
#define INFINITE_MSG_EXCHANGE false
#define TWI_LOOPBACK false
// In non-loopback mode, the tx message is unchanged.
// In loopback mode the rx buffer acts as both the tx and rx buffer. The rx buffer is updated with each read.

////////////////////////////////////////////////////////////

// Adding TWI Functionality

////////////////////////////////////////////////////////////

#define TWI_BUFFER_SIZE 18
 
static const uint8_t readCommand[] = {0x03,0x00} ;
static const uint8_t dataReady[] = {0x02,0x02} ;
static const uint8_t triggerContinuousMeasurement[2] = {0x00,0x10} ;
static const uint8_t deactivateASC[] = {0x53, 0x06, 0x00, 0x00 } ;
static const uint8_t activateASC[2] = {0x53, 0x06 } ;
static const uint8_t getASC[] = {0x53, 0x06 } ;
static const uint8_t softRest[] = {0xD3,0x04} ;															
static const uint8_t framewareVersion[] = {0xD1,0x00} ;		 		

//5sec

static uint8_t i2c_rx_buffer [TWI_BUFFER_SIZE];

// TWI Master Setup

#define MY_TWIM DT_NODELABEL(i2c2)
const struct device *nrfx_twis_dev1;


static void twim_init(void)
{
	int config_result = false;
 

	nrfx_twis_dev1 = device_get_binding(DT_LABEL(MY_TWIM));
	printk(&amp;quot;\n\nI2C Slave: Device driver not found.\n&amp;quot;);
	if (nrfx_twis_dev1 == NULL)
	{
		printk(&amp;quot;\n\nI2C Slave: Device driver not found.\n&amp;quot;);
	}
	else
	{
		printk(&amp;quot;\nI2C device 1: %s\n&amp;quot;, DT_PROP(DT_NODELABEL(twis_device1), label));

		config_result = i2c_configure(nrfx_twis_dev1, I2C_SPEED_SET(I2C_SPEED_FAST) | I2C_MODE_MASTER);

		if (!config_result)
		{
			printk(&amp;quot;I2C Master: Slave ADDR: 0x%x SCL: %d, SDA: %d, CLK(Hz): %u\n\n&amp;quot;,
				   DT_REG_ADDR(DT_NODELABEL(twis_device1)),
				   DT_PROP(MY_TWIM, scl_pin),
				   DT_PROP(MY_TWIM, sda_pin),
				   DT_PROP(MY_TWIM, clock_frequency));
		}
		else
			printk(&amp;quot;\n\nI2C: Configuration error code: %d\n&amp;quot;, config_result);
			
	}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// TWI Master Write
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
void twi_write_tst()
{
	int rtn_code = 0;
	uint8_t incr = 0;
     

	if (nrfx_twis_dev1 != NULL)
	{
		 printk(&amp;quot;\nTWIM TX/writing.&amp;quot;);
	 
		  // write repeated default message
			rtn_code = i2c_write(nrfx_twis_dev1, activateASC ,2, DT_REG_ADDR(DT_NODELABEL(twis_device1)));
		 	printk(&amp;quot;\nTWIM TX/writing -----&amp;gt;        rtn_code: %d&amp;quot;,rtn_code);
	 
		if (ECHO_WRITES &amp;amp;&amp;amp; (rtn_code == 0))
		{/* 
			printk(&amp;quot;\nTWIM TX:&amp;quot;);
			while (incr &amp;lt; 2)
				printk(&amp;quot;| 0x%.2x |&amp;quot;, buffur[incr++]);
			printk(&amp;quot;\n&amp;quot;); */
		} // rtn_code == 0

		if (rtn_code)
		{
			printk(&amp;quot;twi return code %u\n\n&amp;quot;, rtn_code);
		}
	}
	else // twis_dev1 == NULL
		printk(&amp;quot;TWIS device is not initialized correctly.\n&amp;quot;);
} 

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Checking if data is ready or not 
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////

uint8_t getReadyStatus(void)
{	

	// printk(&amp;quot;\n GETTING READY STATUS!! &amp;quot;);
	int rtn_code = 0;
	uint8_t incr = 0;


	if (nrfx_twis_dev1 != NULL)
	{
		// printk(&amp;quot;\nTWIM TX/writing.&amp;quot;);
	 
		  // write repeated default message
			rtn_code = i2c_write(nrfx_twis_dev1, dataReady , 2 , DT_REG_ADDR(DT_NODELABEL(twis_device1)));
		 	 // printk(&amp;quot;\nTWIM TX/writing  /dataReady/ -----&amp;gt; rtn_code: %d&amp;quot;,rtn_code);
	 
		/* if (ECHO_WRITES &amp;amp;&amp;amp; (rtn_code == 0))
		{
			printk(&amp;quot;\nTWIM TX:&amp;quot;);
			while (incr &amp;lt; 2)
				printk(&amp;quot;|  %d  |&amp;quot;, dataReady[incr++]);
			printk(&amp;quot;\n&amp;quot;);
		} // rtn_code == 0
 */
		/* if (rtn_code)
		{
			printk(&amp;quot;twi return code %u\n\n&amp;quot;, rtn_code);
		} */
	}
	else // twis_dev1 == NULL
	//	printk(&amp;quot;TWIS device is not initialized correctly.\n&amp;quot;);

    rtn_code = 0;
	incr = 0;
	k_msleep(5);	
	if (nrfx_twis_dev1 != NULL)
	{
		
	//	printk(&amp;quot;\nTWIM RX/reading --&amp;gt;&amp;quot;);
		rtn_code = i2c_read(nrfx_twis_dev1, i2c_rx_buffer, sizeof(i2c_rx_buffer), DT_REG_ADDR( DT_NODELABEL(twis_device1) ) );
		

		/* print the result */

		if (rtn_code == 0)
		{
	/* 		printk(&amp;quot;TWIM RX:&amp;quot;);
			while (incr &amp;lt; TWI_BUFFER_SIZE)
			{
				printk(&amp;quot; | %d  | &amp;quot;, i2c_rx_buffer[incr++]);
			};
			printk(&amp;quot;\n&amp;quot;);
			 */
			 
		}

		if (rtn_code)  printk(&amp;quot;twi return code %u\n\n&amp;quot;, rtn_code);
	}
	else // twim_dev1 == NULL
		printk(&amp;quot;TWI is not initialized correctly.\n&amp;quot;);

return i2c_rx_buffer[1] ;

} 

void twi_read_tst(void)
{
	int rtn_code = 0;
	uint8_t incr = 0;

	if (nrfx_twis_dev1 != NULL)
	{
		
		printk(&amp;quot;\nTWIM RX/reading --&amp;gt;&amp;quot;);
		rtn_code = i2c_read(nrfx_twis_dev1, i2c_rx_buffer, sizeof(i2c_rx_buffer), DT_REG_ADDR( DT_NODELABEL(twis_device1) ) );
		

		/* print the result */

		if (rtn_code == 0)
		{
			printk(&amp;quot;TWIM RX:&amp;quot;);
			while (incr &amp;lt; TWI_BUFFER_SIZE)
			{
				printk(&amp;quot; | 0x%.2x  | &amp;quot;, i2c_rx_buffer[incr++]);
			};
			printk(&amp;quot;\n&amp;quot;);
		}

		if (rtn_code)  printk(&amp;quot;twi return code %u\n\n&amp;quot;, rtn_code);
	}
	else // twim_dev1 == NULL
		printk(&amp;quot;TWI is not initialized correctly.\n&amp;quot;);
}

void main(void)
{
	uint16_t twi_test_cnt = MSG_EXCHANGE_CNT;
	bool led_is_on = true;
	uint32_t ret;

	led_dev = device_get_binding(LED0);
	if (led_dev == NULL)
	{
		return;
	}

	ret = gpio_pin_configure(led_dev, PIN, GPIO_OUTPUT_ACTIVE | FLAGS);
	if (ret &amp;lt; 0)
	{
		return;
	}

	twim_init();
	k_msleep(2000);
	i2c_write(nrfx_twis_dev1,softRest,2,DT_REG_ADDR(DT_NODELABEL(twis_device1)) )	;
	k_msleep(2000);

	int rtn_code = 5;
	int	incr = 0 ;
	i2c_write(nrfx_twis_dev1,triggerContinuousMeasurement,2,DT_REG_ADDR(DT_NODELABEL(twis_device1)) )	;
	k_msleep(2000);
	i2c_write(nrfx_twis_dev1,activateASC,2,DT_REG_ADDR(DT_NODELABEL(twis_device1)) );
	k_msleep(2000);
	i2c_write(nrfx_twis_dev1,dataReady,2,DT_REG_ADDR(DT_NODELABEL(twis_device1)) );
	k_msleep(2000);
	i2c_read(nrfx_twis_dev1, i2c_rx_buffer, sizeof(i2c_rx_buffer), DT_REG_ADDR( DT_NODELABEL(twis_device1) ) );
 	while (1)
	{

		gpio_pin_set(led_dev, PIN, (int)led_is_on);
		led_is_on = !led_is_on;

		if ((twi_test_cnt) || (INFINITE_MSG_EXCHANGE))
		{		
			incr = 0 ;
			// i2c_write_read(nrfx_twis_dev1, DT_REG_ADDR(DT_NODELABEL(twis_device1)),readCommand,2,i2c_rx_buffer,18);
			i2c_write(nrfx_twis_dev1,readCommand,2,DT_REG_ADDR(DT_NODELABEL(twis_device1)) );
			i2c_read(nrfx_twis_dev1, i2c_rx_buffer, sizeof(i2c_rx_buffer), DT_REG_ADDR( DT_NODELABEL(twis_device1) ) );
 			while (incr &amp;lt; 18)
			printk(&amp;quot;| 0x%.2x |&amp;quot;, i2c_rx_buffer[incr++]);
			printk(&amp;quot;\n&amp;quot;); 
			
			
		}
		k_msleep(10000);
	}
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/blinky_2D00_TWIM3.zip"&gt;devzone.nordicsemi.com/.../blinky_2D00_TWIM3.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: reading data from a sensor that has no driver using TWI</title><link>https://devzone.nordicsemi.com/thread/361467?ContentTypeID=1</link><pubDate>Mon, 04 Apr 2022 10:31:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3545978b-cbae-4a26-8d11-1ca049852b91</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Saed&lt;/p&gt;
&lt;p&gt;Can you show me the code you used to produce this printout?&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see &amp;quot;0x&amp;quot; printed anywhere, so I must assume you didn&amp;#39;t copy my code exactly.&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: reading data from a sensor that has no driver using TWI</title><link>https://devzone.nordicsemi.com/thread/361272?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 14:35:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5fd4c87a-baa2-41cf-87a3-9c942504fef3</guid><dc:creator>Saed</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;thanks for your continuous support, I tried the hex and the decimal representation it looks like this!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2548.png" /&gt;&lt;/p&gt;
&lt;p&gt;kind regards&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Saed&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: reading data from a sensor that has no driver using TWI</title><link>https://devzone.nordicsemi.com/thread/361177?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 09:26:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82e0dba1-aae4-43ea-9195-3cc3023ff997</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Good to hear you got the sensor working &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Most likely the data from the sensor will not make sense in ASCII presentation.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You could try to print the data as hex or int values instead. To print as hex with at minimum two digits presentation, you can do it like this:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;int hex_val = 0x12; &lt;/em&gt;&lt;br /&gt;&lt;em&gt;printk(&amp;quot;Hex value: 0x%.2x&amp;quot;, hex_val);&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: reading data from a sensor that has no driver using TWI</title><link>https://devzone.nordicsemi.com/thread/361089?ContentTypeID=1</link><pubDate>Thu, 31 Mar 2022 15:54:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:016b0452-03b7-45ae-900b-d2ad5a357017</guid><dc:creator>Saed</dc:creator><description>&lt;p&gt;Hi, thank you for your reply I was able to find the device using the scanner and I was also able to fix the previous code and it flashed successfully, the only problem now is that the readings from the sensor are printed in weird characters&amp;nbsp;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2022_2D00_03_2D00_31-175201.png" /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/blinky_2D00_TWIM_2D00_updated.zip"&gt;devzone.nordicsemi.com/.../blinky_2D00_TWIM_2D00_updated.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: reading data from a sensor that has no driver using TWI</title><link>https://devzone.nordicsemi.com/thread/360981?ContentTypeID=1</link><pubDate>Thu, 31 Mar 2022 10:37:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d021bdf-1d3a-4c9e-a299-b2cdbf6d5439</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;If you just want to get I2C running you can do this quite easily, without making any changes to the device tree configuration.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I added a small example showing how to do this, based on the blinky sample in Zephyr:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/3513.i2c_5F00_scanner.zip"&gt;devzone.nordicsemi.com/.../3513.i2c_5F00_scanner.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you run this example with your I2C sensor connected it should print out the I2C address of your sensor, assuming everything is connected properly.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>