<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[forum.rcl-radio.ru &mdash; управление драйвером жк lc75823]]></title>
		<link>http://forum.rcl-radio.ru/viewtopic.php?id=627</link>
		<atom:link href="http://forum.rcl-radio.ru/extern.php?action=feed&amp;tid=627&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «управление драйвером жк lc75823».]]></description>
		<lastBuildDate>Thu, 28 Mar 2024 14:41:29 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: управление драйвером жк lc75823]]></title>
			<link>http://forum.rcl-radio.ru/viewtopic.php?pid=10004#p10004</link>
			<description><![CDATA[<p>всё, завелся</p>]]></description>
			<author><![CDATA[null@example.com (vladbuharkin20)]]></author>
			<pubDate>Thu, 28 Mar 2024 14:41:29 +0000</pubDate>
			<guid>http://forum.rcl-radio.ru/viewtopic.php?pid=10004#p10004</guid>
		</item>
		<item>
			<title><![CDATA[Re: управление драйвером жк lc75823]]></title>
			<link>http://forum.rcl-radio.ru/viewtopic.php?pid=10003#p10003</link>
			<description><![CDATA[<p>Не вижу причин почему не работает, тот скетч который Вы опубликовали у меня не компилируется, похоже библиотеки разные.</p><p>Вот библиотека которую я использую - Библиотека Radio — <a href="http://rcl-radio.ru/wp-content/uploads/2018/12/radio.zip">http://rcl-radio.ru/wp-content/uploads/ … /radio.zip</a></p><div class="codebox"><pre><code>#include &lt;Wire.h&gt;
#define CLK    8 // CLK ENCODER
#define DT     7 // DT  ENCODER
#define SW     6 // SW  ENCODER

#include &lt;radio.h&gt;
#include &lt;RDA5807M.h&gt;
#include &lt;Encoder.h&gt;               
#include &lt;MsTimer2.h&gt;

#define FIX_BAND    RADIO_BAND_FM   
RDA5807M radio; 
Encoder myEnc(CLK, DT);
  
long times,oldPosition  = -999,newPosition;
int k[14]= {8750,8830,8910,8950,9120,9160,9360,9520,9800,9960,10120,10210,10370,10570};
bool radio_on_off=1;
bool start=0;
int i_radio, f_radio;

void setup() {
  Serial.begin(9600);
  Wire.begin();
  MsTimer2::set(1, to_Timer);MsTimer2::start();
  radio.init();
  radio.debugEnable();
  radio.setVolume(15);
  radio.setMono(false);// true - MONO
  radio.setMute(false);
  f_radio = k[0];
  radio.setBandFrequency(FIX_BAND, 10370);
  delay(400);
} 

void loop(){
  if(radio_on_off==1){
   if(digitalRead(SW)==0){i_radio++;if(i_radio&gt;13){i_radio=0;}start=1;f_radio = k[i_radio]; delay(200);}
    

   if (newPosition != oldPosition){oldPosition = newPosition;if(newPosition&gt;1){newPosition=1;}if(newPosition&lt;-1){newPosition=-1;}
     start=1; f_radio=f_radio+newPosition*10;newPosition=0;start=1;}
  
   if(start==1){radio.setBandFrequency(FIX_BAND, f_radio);delay(200);start=0;Serial.println(f_radio);}
  }
  }

  void to_Timer(){newPosition = myEnc.read()/4;}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (liman324)]]></author>
			<pubDate>Thu, 28 Mar 2024 14:37:26 +0000</pubDate>
			<guid>http://forum.rcl-radio.ru/viewtopic.php?pid=10003#p10003</guid>
		</item>
		<item>
			<title><![CDATA[Re: управление драйвером жк lc75823]]></title>
			<link>http://forum.rcl-radio.ru/viewtopic.php?pid=10002#p10002</link>
			<description><![CDATA[<p>Когда я запускаю тестовый скетч из библиотеки все работает. Вот скетч<br /></p><div class="codebox"><pre><code>///
/// \file  TestRDA5807M.ino
/// \brief An Arduino sketch to operate a SI4705 chip based radio using the Radio library.
///
/// \author Matthias Hertel, http://www.mathertel.de
/// \copyright Copyright (c) 2014 by Matthias Hertel.\n
/// This work is licensed under a BSD style license. See http://www.mathertel.de/License.aspx
///
/// \details
/// This sketch implements a &quot;as simple as possible&quot; radio without any possibility to modify the settings after initializing the chip.\n
/// The radio chip is initialized and setup to a fixed band and frequency. These settings can be changed by modifying the
/// FIX_BAND and FIX_STATION definitions.
///
/// Open the Serial console with 57600 baud to see the current radio information.
///
/// Wiring
/// ------
/// The RDA5807M board/chip has to be connected by using the following connections:
///
/// | Signal       | Arduino UNO | ESP8266 | ESP32  | Radio chip signal |
/// | ------------ | ------------| ------- | ------ | ----------------- |
/// | VCC (red)    | 3.3V        | 3v3     | 3v3    | VCC               |
/// | GND (black)  | GND         | GND     | GND    | GND               |
/// | SCL (yellow) | A5 / SCL    | D1      | 22     | SCLK              |
/// | SDA (blue)   | A4 / SDA    | D2      | 21     | SDIO              |
///
/// The locations of the signals on the RDA5807M side depend on the board you use.
/// More documentation is available at http://www.mathertel.de/Arduino
/// Source Code is available on https://github.com/mathertel/Radio
///
/// ChangeLog:
/// ----------
/// * 05.12.2014 created.
/// * 19.05.2015 extended.

#include &lt;Arduino.h&gt;
#include &lt;Wire.h&gt;

#include &lt;radio.h&gt;
#include &lt;RDA5807M.h&gt;

// ----- Fixed settings here. -----

#define FIX_BAND RADIO_BAND_FM  ///&lt; The band that will be tuned by this sketch is FM.
#define FIX_STATION 10370        ///&lt; The station that will be tuned by this sketch is 89.30 MHz.
#define FIX_VOLUME 10           ///&lt; The volume that will be set by this sketch is level 4.

RDA5807M radio;  // Create an instance of Class for RDA5807M Chip

/// Setup a FM only radio configuration
/// with some debugging on the Serial port
void setup() {
  delay(3000);
  // open the Serial port
  Serial.begin(115200);
  Serial.println(&quot;RDA5807M Radio...&quot;);
  delay(200);

  // Enable information to the Serial port
  radio.debugEnable(true);
  radio._wireDebug(false);

  // Set FM Options for Europe
  radio.setup(RADIO_FMSPACING, RADIO_FMSPACING_100);   // for EUROPE
  radio.setup(RADIO_DEEMPHASIS, RADIO_DEEMPHASIS_50);  // for EUROPE

  // Initialize the Radio
  if (!radio.initWire(Wire)) {
    Serial.println(&quot;no radio chip found.&quot;);
    delay(4000);

  };

  // Set all radio setting to the fixed values.
  radio.setBandFrequency(FIX_BAND, FIX_STATION);
  radio.setVolume(FIX_VOLUME);
  radio.setMono(false);
  radio.setMute(false);
}  // setup


/// show the current chip data every 3 seconds.
void loop() {
  char s[12];
  radio.formatFrequency(s, sizeof(s));
  Serial.print(&quot;Station:&quot;);
  Serial.println(s);

  Serial.print(&quot;Radio:&quot;);
  radio.debugRadioInfo();

  Serial.print(&quot;Audio:&quot;);
  radio.debugAudioInfo();

  delay(3000);
}  // loop

// End.</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (vladbuharkin20)]]></author>
			<pubDate>Thu, 28 Mar 2024 14:27:18 +0000</pubDate>
			<guid>http://forum.rcl-radio.ru/viewtopic.php?pid=10002#p10002</guid>
		</item>
		<item>
			<title><![CDATA[Re: управление драйвером жк lc75823]]></title>
			<link>http://forum.rcl-radio.ru/viewtopic.php?pid=10001#p10001</link>
			<description><![CDATA[<p>Нет,тишина</p>]]></description>
			<author><![CDATA[null@example.com (vladbuharkin20)]]></author>
			<pubDate>Thu, 28 Mar 2024 14:25:52 +0000</pubDate>
			<guid>http://forum.rcl-radio.ru/viewtopic.php?pid=10001#p10001</guid>
		</item>
		<item>
			<title><![CDATA[Re: управление драйвером жк lc75823]]></title>
			<link>http://forum.rcl-radio.ru/viewtopic.php?pid=10000#p10000</link>
			<description><![CDATA[<p>щас усилитель подключу,и напишу</p>]]></description>
			<author><![CDATA[null@example.com (vladbuharkin20)]]></author>
			<pubDate>Thu, 28 Mar 2024 14:18:48 +0000</pubDate>
			<guid>http://forum.rcl-radio.ru/viewtopic.php?pid=10000#p10000</guid>
		</item>
		<item>
			<title><![CDATA[Re: управление драйвером жк lc75823]]></title>
			<link>http://forum.rcl-radio.ru/viewtopic.php?pid=9999#p9999</link>
			<description><![CDATA[<p>радио работает?</p>]]></description>
			<author><![CDATA[null@example.com (liman324)]]></author>
			<pubDate>Thu, 28 Mar 2024 14:17:15 +0000</pubDate>
			<guid>http://forum.rcl-radio.ru/viewtopic.php?pid=9999#p9999</guid>
		</item>
		<item>
			<title><![CDATA[Re: управление драйвером жк lc75823]]></title>
			<link>http://forum.rcl-radio.ru/viewtopic.php?pid=9998#p9998</link>
			<description><![CDATA[<p>вот что у меня выводится в порт<br /><span class="postimg"><img src="http://forum.rcl-radio.ru/uploads/images/2024/03/86561a416720717613dbff3432568ed4.png" alt="http://forum.rcl-radio.ru/uploads/images/2024/03/86561a416720717613dbff3432568ed4.png" /></span></p>]]></description>
			<author><![CDATA[null@example.com (vladbuharkin20)]]></author>
			<pubDate>Thu, 28 Mar 2024 14:15:47 +0000</pubDate>
			<guid>http://forum.rcl-radio.ru/viewtopic.php?pid=9998#p9998</guid>
		</item>
		<item>
			<title><![CDATA[Re: управление драйвером жк lc75823]]></title>
			<link>http://forum.rcl-radio.ru/viewtopic.php?pid=9997#p9997</link>
			<description><![CDATA[<div class="codebox"><pre><code>#include &lt;Wire.h&gt;
#define CLK    8 // CLK ENCODER
#define DT     7 // DT  ENCODER
#define SW     6 // SW  ENCODER

#include &lt;radio.h&gt;
#include &lt;RDA5807M.h&gt;
#include &lt;Encoder.h&gt;               
#include &lt;MsTimer2.h&gt;

#define FIX_BAND    RADIO_BAND_FM   
RDA5807M radio; 
Encoder myEnc(CLK, DT);
  
long times,oldPosition  = -999,newPosition;
int k[14]= {8750,8830,8910,8950,9120,9160,9360,9520,9800,9960,10120,10210,10370,10570};
bool radio_on_off=1;
bool start=0;
int i_radio, f_radio;

void setup() {
  Serial.begin(9600);
  Wire.begin();
  MsTimer2::set(1, to_Timer);MsTimer2::start();
  radio.init();
  radio.debugEnable();
  radio.setVolume(15);
  radio.setMono(false);// true - MONO
  radio.setMute(0);
  f_radio = k[0];
  radio.setBandFrequency(FIX_BAND, 10370);
  delay(400);
} 

void loop(){
  if(radio_on_off==1){
   if(digitalRead(SW)==0){i_radio++;if(i_radio&gt;13){i_radio=0;}start=1;f_radio = k[i_radio]; delay(200);}
    

   if (newPosition != oldPosition){oldPosition = newPosition;if(newPosition&gt;1){newPosition=1;}if(newPosition&lt;-1){newPosition=-1;}
     start=1; f_radio=f_radio+newPosition*10;newPosition=0;start=1;}
  
   if(start==1){radio.setBandFrequency(FIX_BAND, f_radio);delay(200);start=0;}
  }
  }

  void to_Timer(){newPosition = myEnc.read()/4;}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (liman324)]]></author>
			<pubDate>Thu, 28 Mar 2024 13:13:31 +0000</pubDate>
			<guid>http://forum.rcl-radio.ru/viewtopic.php?pid=9997#p9997</guid>
		</item>
		<item>
			<title><![CDATA[Re: управление драйвером жк lc75823]]></title>
			<link>http://forum.rcl-radio.ru/viewtopic.php?pid=9996#p9996</link>
			<description><![CDATA[<p>Можете скинуть. Весь код, что бы я скопировал</p>]]></description>
			<author><![CDATA[null@example.com (vladbuharkin20)]]></author>
			<pubDate>Thu, 28 Mar 2024 13:11:28 +0000</pubDate>
			<guid>http://forum.rcl-radio.ru/viewtopic.php?pid=9996#p9996</guid>
		</item>
		<item>
			<title><![CDATA[Re: управление драйвером жк lc75823]]></title>
			<link>http://forum.rcl-radio.ru/viewtopic.php?pid=9995#p9995</link>
			<description><![CDATA[<p>Должно быть примерно следующее</p><p><span class="postimg"><img src="http://rcl-radio.ru/wp-content/uploads/2018/12/67964368638428.png" alt="http://rcl-radio.ru/wp-content/uploads/2018/12/67964368638428.png" /></span></p>]]></description>
			<author><![CDATA[null@example.com (liman324)]]></author>
			<pubDate>Thu, 28 Mar 2024 08:44:04 +0000</pubDate>
			<guid>http://forum.rcl-radio.ru/viewtopic.php?pid=9995#p9995</guid>
		</item>
		<item>
			<title><![CDATA[Re: управление драйвером жк lc75823]]></title>
			<link>http://forum.rcl-radio.ru/viewtopic.php?pid=9994#p9994</link>
			<description><![CDATA[<p>Если не заработает то delay(100) замените на</p><p>delay(200)<br />потом на<br />delay(300)<br />потом на<br />delay(400)</p>]]></description>
			<author><![CDATA[null@example.com (liman324)]]></author>
			<pubDate>Thu, 28 Mar 2024 08:42:41 +0000</pubDate>
			<guid>http://forum.rcl-radio.ru/viewtopic.php?pid=9994#p9994</guid>
		</item>
		<item>
			<title><![CDATA[Re: управление драйвером жк lc75823]]></title>
			<link>http://forum.rcl-radio.ru/viewtopic.php?pid=9993#p9993</link>
			<description><![CDATA[<p>В setup перед delay(100) вставьте строчку</p><p>radio.setBandFrequency(FIX_BAND, 10370);</p><p>Должно заработать радио</p>]]></description>
			<author><![CDATA[null@example.com (liman324)]]></author>
			<pubDate>Thu, 28 Mar 2024 08:36:25 +0000</pubDate>
			<guid>http://forum.rcl-radio.ru/viewtopic.php?pid=9993#p9993</guid>
		</item>
		<item>
			<title><![CDATA[Re: управление драйвером жк lc75823]]></title>
			<link>http://forum.rcl-radio.ru/viewtopic.php?pid=9992#p9992</link>
			<description><![CDATA[<p>что то не работает, выводил много чего в порт, но безуспешно, там тишина</p>]]></description>
			<author><![CDATA[null@example.com (vladbuharkin20)]]></author>
			<pubDate>Thu, 28 Mar 2024 08:15:27 +0000</pubDate>
			<guid>http://forum.rcl-radio.ru/viewtopic.php?pid=9992#p9992</guid>
		</item>
		<item>
			<title><![CDATA[Re: управление драйвером жк lc75823]]></title>
			<link>http://forum.rcl-radio.ru/viewtopic.php?pid=9991#p9991</link>
			<description><![CDATA[<p>какая переменная отвечает за частоты(что бы на дисплей вывести)?</p>]]></description>
			<author><![CDATA[null@example.com (vladbuharkin20)]]></author>
			<pubDate>Thu, 28 Mar 2024 07:53:16 +0000</pubDate>
			<guid>http://forum.rcl-radio.ru/viewtopic.php?pid=9991#p9991</guid>
		</item>
		<item>
			<title><![CDATA[Re: управление драйвером жк lc75823]]></title>
			<link>http://forum.rcl-radio.ru/viewtopic.php?pid=9990#p9990</link>
			<description><![CDATA[<p>Нет гарантий то будет работать, но должно.<br />Условие radio_on_off == 1 должно быть выполнено, то бы работало радио. Добавить кнопку которое бы меняло условие radio_on_off == 0 на radio_on_off == 1 и наоборот.</p><div class="codebox"><pre><code>#include &lt;Wire.h&gt;
#define CLK    8 // CLK ENCODER
#define DT     7 // DT  ENCODER
#define SW     6 // SW  ENCODER

#include &lt;radio.h&gt;
#include &lt;RDA5807M.h&gt;
#include &lt;Encoder.h&gt;               
#include &lt;MsTimer2.h&gt;

#define FIX_BAND    RADIO_BAND_FM   
RDA5807M radio; 
Encoder myEnc(CLK, DT);
  
long times,oldPosition  = -999,newPosition;
int k[14]= {8750,8830,8910,8950,9120,9160,9360,9520,9800,9960,10120,10210,10370,10570};
bool radio_on_off=1;
bool start=0;
int i_radio, f_radio;

void setup() {
  MsTimer2::set(1, to_Timer);MsTimer2::start();
  radio.init();
  radio.debugEnable();
  radio.setVolume(15);
  radio.setMono(false);// true - MONO
  radio.setMute(0);
  f_radio = k[0];
  delay(100);
} 

void loop(){
  if(radio_on_off==1){
   if(digitalRead(SW)==0){i_radio++;if(i_radio&gt;13){i_radio=0;}start=1;f_radio = k[i_radio]; delay(200);}
    

   if (newPosition != oldPosition){oldPosition = newPosition;if(newPosition&gt;1){newPosition=1;}if(newPosition&lt;-1){newPosition=-1;}
     start=1; f_radio=f_radio+newPosition*10;newPosition=0;start=1;}
  
   if(start==1){radio.setBandFrequency(FIX_BAND, f_radio);delay(100);start=0;}
  }
  }

  void to_Timer(){newPosition = myEnc.read()/4;}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (liman324)]]></author>
			<pubDate>Thu, 28 Mar 2024 07:40:26 +0000</pubDate>
			<guid>http://forum.rcl-radio.ru/viewtopic.php?pid=9990#p9990</guid>
		</item>
	</channel>
</rss>
