{"id":2670,"date":"2023-08-23T08:40:15","date_gmt":"2023-08-23T08:40:15","guid":{"rendered":"https:\/\/vegaprocessors.in\/blog\/?p=2670"},"modified":"2023-09-19T07:15:06","modified_gmt":"2023-09-19T07:15:06","slug":"how-to-scan-and-detect-i2c-address-using-aries-v3-0","status":"publish","type":"post","link":"https:\/\/vegaprocessors.in\/blog\/how-to-scan-and-detect-i2c-address-using-aries-v3-0\/","title":{"rendered":"How to Scan and Detect I2C address using ARIES v3.0"},"content":{"rendered":"\n<p>In this tutorial, we will see how we can find I2C address for different sensors using I2C bus with ARIES v3.0 Board using an I2C device OLED SSD1306.<\/p>\n\n\n\n<p>Each I2C device consists of a unique address which is used to identify the device connected in the bus. The master scans the&nbsp;<strong>I2C<\/strong>-bus&nbsp;<strong>for&nbsp;<\/strong>devices. If a device is found, it is reported to the Arduino serial monitor. This sketch is the first step to get the&nbsp;<strong>I2C&nbsp;<\/strong>communication working. The sketch shows the 7-bit addresses of the found devices as hexadecimal values.<\/p>\n\n\n\n<p>In this example we will be using an SSD1306 OLED Display, for checking the I2C address. You can use any  sensor working with I2C device to test the example code by following the procedure given below.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">OLED display<\/h2>\n\n\n\n<p>OLED displays have much less thickness than LCD displays with good brightness and also produce better and true colors. The connection of this display with ARIES is made through the I2C (also called as IIC) serial interface. These displays can be used in various applications including smart watch, MP3, function cellphone, portable health device and many others.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/12.png\" alt=\"\" class=\"wp-image-2672\" style=\"width:269px;height:220px\" width=\"269\" height=\"220\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/12.png 627w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/12-300x245.png 300w\" sizes=\"auto, (max-width: 269px) 100vw, 269px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Windows 10 or above\/Linux (64 bit)<\/li>\n\n\n\n<li>Arduino IDE<\/li>\n\n\n\n<li><a rel=\"noreferrer noopener\" href=\"https:\/\/vegaprocessors.in\/devboards\/ariesv3.html\" target=\"_blank\">VEGA ARIES Board support package<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Components Required<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>ARIES v3.0 Board<\/li>\n\n\n\n<li>USB type C to USB type A cable<\/li>\n\n\n\n<li>SSD1306 OLED Display<\/li>\n\n\n\n<li>Jumper Wires<\/li>\n<\/ul>\n\n\n\n<p><strong>Not<\/strong><strong>e:<\/strong>&nbsp;All of the following boards can be used for this project<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/vegaprocessors.in\/devboards\/ariesv2.php\">ARIES v2.0<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/vegaprocessors.in\/devboards\/ariesv3.php\">ARIES v3.0<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/vegaprocessors.in\/devboards\/ariesmicro.php\">ARIES Micro<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/vegaprocessors.in\/devboards\/ariesdot.php\">ARIES DOT<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/vegaprocessors.in\/devboards\/ariesiot.php\">ARIES IoT<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Circuit Diagram:<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"711\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/oled2-2-1024x711.png\" alt=\"\" class=\"wp-image-2746\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/oled2-2-1024x711.png 1024w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/oled2-2-300x208.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/oled2-2-768x533.png 768w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/oled2-2.png 1061w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Connections:<\/h2>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><tbody><tr><td><strong>OLED Display<\/strong><\/td><td><strong>ARIES V3 board<\/strong><\/td><\/tr><tr><td>VCC<\/td><td>3.3V<\/td><\/tr><tr><td>GND<\/td><td>GND<\/td><\/tr><tr><td>SCK\/SCL<\/td><td>SCL-0<\/td><\/tr><tr><td>SDA<\/td><td>SDA-0<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\"><strong><em>Connection pins of OLED Display &amp; ARIES v3.0 Board<\/em><\/strong><\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Procedure<\/h2>\n\n\n\n<p>Open and set up the Arduino IDE as described in&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/vegaprocessors.in\/devboards\/ariesv2.html\" target=\"_blank\">Getting Started with ARIES v3.0<\/a>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Make sure you have selected&nbsp;<strong>ARIES v3<\/strong>&nbsp;Board from&nbsp;<strong>Tools<\/strong>&nbsp;-&gt;&nbsp;<strong>Board<\/strong>&nbsp;-&gt;&nbsp;<strong>VEGA Processor: ARIES Boards<\/strong>&nbsp;-&gt;&nbsp;<strong>ARIES v3<\/strong><\/li>\n\n\n\n<li>Select Programmer as VEGA XMODEM from&nbsp;<strong>Tools<\/strong>&nbsp;-&gt;&nbsp;<strong>Programmer<\/strong>&nbsp;-&gt;&nbsp;<strong>VEGA XMODEM<\/strong><\/li>\n\n\n\n<li>Also select appropriate port from&nbsp;<strong>Tools<\/strong>&nbsp;-&gt;&nbsp;<strong>Port&nbsp;-&gt; COM* (ARIES v3)<\/strong><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"411\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/13-1024x411.png\" alt=\"\" class=\"wp-image-2675\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/13-1024x411.png 1024w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/13-300x120.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/13-768x308.png 768w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/13.png 1158w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Now, Open&nbsp;<strong>Files<\/strong>&nbsp;-&gt;&nbsp;<strong>Examples<\/strong>&nbsp;-&gt; Under&nbsp;<strong>Examples for ARIES v3<\/strong>&nbsp;<strong>-&gt;&nbsp;Wire-&gt;&nbsp;VEGA_I2C_scanner<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/14-1024x685.png\" alt=\"\" class=\"wp-image-2676\" style=\"width:549px;height:367px\" width=\"549\" height=\"367\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/14-1024x685.png 1024w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/14-300x201.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/14-768x514.png 768w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/14.png 1196w\" sizes=\"auto, (max-width: 549px) 100vw, 549px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Libraries<\/h2>\n\n\n\n<p>Arduino libraries are an extension of the standard Arduino API and consists of thousands of libraries, both official and contributed by the community. Libraries simplifies the use of complex codes. Every version of Arduino IDE has a library manager for installing Arduino software libraries. The libraries required for this projects are<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Adafruit SSD1306<\/li>\n\n\n\n<li>Adafruit GFX Library<\/li>\n\n\n\n<li>Adafruit BusIO<\/li>\n<\/ul>\n\n\n\n<p>To install the libraries required for this project.<\/p>\n\n\n\n<p>Go to <strong>Tools -&gt; Library Manager<\/strong> -&gt; and search for Adafruit SSD1306<\/p>\n\n\n\n<p>Click on<strong> Install all<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/11-1.png\" alt=\"\" class=\"wp-image-2677\" style=\"width:721px;height:408px\" width=\"721\" height=\"408\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/11-1.png 977w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/11-1-300x170.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/11-1-768x435.png 768w\" sizes=\"auto, (max-width: 721px) 100vw, 721px\" \/><\/figure>\n\n\n\n<p>Once you have downloaded the required libraries you can upload the code to ARIES board.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Output<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/oledfig.png\" alt=\"\" class=\"wp-image-2801\" style=\"width:305px;height:288px\" width=\"305\" height=\"288\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/oledfig.png 422w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/oledfig-300x283.png 300w\" sizes=\"auto, (max-width: 305px) 100vw, 305px\" \/><\/figure>\n\n\n\n<p>Once you\u2019ve completed the code, upload it to your ARIES v3.0 board using the Arduino IDE.&nbsp;Wait until the program is uploaded. After completing the upload, the program will start to execute.&nbsp;The hexadecimal I2C address of the SSD1306 OLED Display will be printed on the serial monitor.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/16.png\" alt=\"\" class=\"wp-image-2679\" style=\"width:693px;height:429px\" width=\"693\" height=\"429\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/16.png 867w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/16-300x186.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/16-768x476.png 768w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we will see how we can find I2C address for different sensors using I2C bus with ARIES v3.0 Board using an I2C device OLED SSD1306. Each I2C device consists of a unique address which is used to identify the device connected in the bus. The master scans the&nbsp;I2C-bus&nbsp;for&nbsp;devices. If a device is [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[94],"tags":[95,7,66,77,31,24],"class_list":["post-2670","post","type-post","status-publish","format-standard","hentry","category-aries-with-arduinoide","tag-aries-v3-board","tag-cdac","tag-iic","tag-thejas-32","tag-thejas32","tag-vegaprocessor"],"_links":{"self":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts\/2670","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/comments?post=2670"}],"version-history":[{"count":10,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts\/2670\/revisions"}],"predecessor-version":[{"id":3326,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts\/2670\/revisions\/3326"}],"wp:attachment":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/media?parent=2670"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/categories?post=2670"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/tags?post=2670"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}