{"id":360,"date":"2024-11-14T14:00:47","date_gmt":"2024-11-14T14:00:47","guid":{"rendered":"https:\/\/fletch.scot\/wp\/?p=360"},"modified":"2024-11-25T11:18:44","modified_gmt":"2024-11-25T11:18:44","slug":"adding-track-info-display-to-a-yamaha-r-n602-with-arduino","status":"publish","type":"post","link":"https:\/\/fletch.scot\/wp\/?p=360","title":{"rendered":"Adding Track Info Display to a Yamaha R-N602 with Arduino"},"content":{"rendered":"<p>If you\u2019re like me, and you listen to music on a Yamaha R-N602 network receiver via Qobuz, you will \u00a0appreciate that the R-N602 can stream directly without needing a phone or tablet as an intermediary. Qobuz, with its detailed remastering, delivers the kind of sound quality that I prefer over other streaming services.<\/p>\n<p>However, there\u2019s a minor drawback: the R-N602\u2019s display doesn\u2019t show any track information\u2014just a generic \u201cQobuz\u201d label. I decided to fix this with a small, adaptable project using an Arduino R4 Wi-Fi and an LCD shield to display the track, artist, and album information in real-time.<\/p>\n<p><strong>Project Overview<\/strong><\/p>\n<p>The concept is straightforward: the Arduino connects to the same Wi-Fi as the R-N602, retrieves the currently playing track information from the receiver, and then displays it on a 2&#215;16 LCD screen.<\/p>\n<p>Here\u2019s how it works:<br \/>1. Interfacing with the R-N602: The Yamaha receiver serves a web page in JSON format, containing details about the current track. By connecting to this page, the Arduino can extract the artist, track title, and album name.<br \/>2. Displaying the Info: The artist and album are initially shown one per line on the LCD. Then, the track name appears across both lines. If the information is longer than the screen\u2019s width, it scrolls once to show the full text before switching to a truncated display.<br \/>3. Continuous Updates: The code loops to refresh the display periodically, keeping it in sync with the receiver\u2019s current playback status.<\/p>\n<p><strong>Setting Up the Project<\/strong><\/p>\n<p>Here\u2019s what you\u2019ll need:<br \/>\u2022 An Arduino R4 WiFi and a compatible 2&#215;16 LCD shield. I used these because they were to hand.<\/p>\n<p>\u2022 To install some libraries needed by the project\u2014WiFiS3, ArduinoHttpClient, ArduinoJson and LiquidCrystal.<\/p>\n<p>\u2022 Access to your WiFi credentials, which are saved in a separate arduino_secrets.h file. Here\u2019s how that file should look:<\/p>\n<p>#define SECRET_SSID &#8220;Your Wifi SSID&#8221;<br \/>#define SECRET_PASS &#8220;Your Wifi Password&#8221;<\/p>\n<p><strong>Code and Demo<\/strong><\/p>\n<p>You can find the complete code for this project in my next post. To see it in action, check out the demo video here: <a title=\"IMG_2071.mp4\" href=\"https:\/\/fletch.scot\/wp\/wp-content\/uploads\/2024\/11\/IMG_2071.mp4\">IMG_2071.mp4<\/a>. (BTW this video shows a scrolling bug which has been fixed.)<\/p>\n<p>You\u2019ll need to edit the code to put in your Yamaha\u2019s IP address.<\/p>\n<p>This project, while initially intended to add track info display to my setup, could be adapted for other similar use cases.<\/p>\n<p><strong>Improvements on the Horizon<\/strong><\/p>\n<p>There\u2019s always room for some tweaks. Here are a few ideas I\u2019ve been considering:<br \/>\u2022 Split track lines at a word: Ensuring clean breaks in text can make track info easier to read.<br \/>\u2022 Handle non-ASCII characters: tracks and albums often include accented characters\u2014like &#8220;Florence sur les Champs-\u00c9lys\u00e9es&#8221;\u2014and properly supporting these would make them much more legible.<br \/>\u2022 Instant track info updates: As soon as a track changes, the displayed details should switch immediately, keeping everything in sync. This doesn\u2019t look easy.<\/p>\n<p>I\u2019m leaning towards prioritizing non-ASCII character handling first. Many of the albums I enjoy feature accented characters, and ensuring they\u2019re displayed correctly feels like a good improvement.<\/p>\n<p>Enjoy tinkering, and happy listening!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you\u2019re like me, and you listen to music on a Yamaha R-N602 network receiver via Qobuz, you will \u00a0appreciate that the R-N602 can stream directly without needing a phone or tablet as an intermediary. Qobuz, with its detailed remastering, delivers the kind of sound quality that I prefer over other streaming services. However, there\u2019s &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/fletch.scot\/wp\/?p=360\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Adding Track Info Display to a Yamaha R-N602 with Arduino&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-360","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=\/wp\/v2\/posts\/360","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=360"}],"version-history":[{"count":10,"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=\/wp\/v2\/posts\/360\/revisions"}],"predecessor-version":[{"id":374,"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=\/wp\/v2\/posts\/360\/revisions\/374"}],"wp:attachment":[{"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=360"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}