<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[RemoteXY community — HM-10 на чипе CC2541]]></title>
		<link>https://forum.remotexy.com/viewtopic.php?id=316</link>
		<atom:link href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=316&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in HM-10 на чипе CC2541.]]></description>
		<lastBuildDate>Wed, 20 Jan 2021 12:37:38 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: HM-10 на чипе CC2541]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=3528#p3528</link>
			<description><![CDATA[<p>Добрый день, подключил к ардуино модуль HM-10, написал код для управление сервоприводом, но двигался он рывками.<br />Решил отладить это дело через Serial. И он меняет значение слайдера рывками, то есть не последовательно. Как будто опрос данных с телефона медленный, в чем может быть дело? Нужно достичь плавного движения сервопривода.<br /></p><div class="codebox"><pre><code>/*
   -- New project --
   
   This source code of graphical user interface 
   has been generated automatically by RemoteXY editor.
   To compile this code using RemoteXY library 2.4.3 or later version 
   download by link http://remotexy.com/en/library/
   To connect using RemoteXY mobile app by link http://remotexy.com/en/download/                   
     - for ANDROID 4.5.1 or later version;
     - for iOS 1.4.1 or later version;
    
   This source code is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.    
*/

//////////////////////////////////////////////
//        RemoteXY include library          //
//////////////////////////////////////////////

// определение режима соединения и подключение библиотеки RemoteXY 
#define REMOTEXY_MODE__SOFTSERIAL
#include &lt;SoftwareSerial.h&gt;

#include &lt;RemoteXY.h&gt;

// настройки соединения 
#define REMOTEXY_SERIAL_RX 2
#define REMOTEXY_SERIAL_TX 4
#define REMOTEXY_SERIAL_SPEED 9600


// конфигурация интерфейса  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,1,0,0,0,11,0,10,13,1,
  4,32,25,6,13,86,2,26 };
  
// структура определяет все переменные и события вашего интерфейса управления 
struct {

    // input variables
  int8_t slider_1; // =-100..100 положение слайдера 

    // other variable
  uint8_t connect_flag;  // =1 if wire connected, else =0 

} RemoteXY;
#pragma pack(pop)

/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////

int slider_1_s;

void setup() 
{
  RemoteXY_Init (); 
  Serial.begin(9600);
  
  RemoteXY.slider_1 = -100;
  // TODO you setup code
  
}

void loop() 
{ 
  RemoteXY_Handler ();
  slider_1_s = (RemoteXY.slider_1+100)*10+500;
// slider_tiller_s = map(slider_tiller_s, -100, 100, 0, 180);
  Serial.print(RemoteXY.slider_1);
  Serial.print(&quot; | &quot;);
  Serial.println(slider_1_s);
  
  // TODO you loop code
  // используйте структуру RemoteXY для передачи данных
  // не используйте функцию delay() 


}</code></pre></div><p>вот что выдает Serial на передвижение слайдера<br /></p><div class="codebox"><pre><code>-100 | 500
-100 | 500
-100 | 500
-100 | 500
-100 | 500
-88 | 620
-88 | 620
-88 | 620
-88 | 620
-88 | 620
-88 | 620
-88 | 620
-88 | 620
-88 | 620
-88 | 620
-88 | 620
-88 | 620
-88 | 620
-88 | 620
-88 | 620
-88 | 620
-88 | 620
-88 | 620
-23 | 1270
-23 | 1270
-23 | 1270
-23 | 1270
-23 | 1270
-23 | 1270
-23 | 1270
-23 | 1270
-23 | 1270
-23 | 1270
-23 | 1270
-23 | 1270
65 | 2150
65 | 2150
65 | 2150
65 | 2150
65 | 2150
65 | 2150
65 | 2150
65 | 2150
65 | 2150
65 | 2150
65 | 2150
65 | 2150
65 | 2150
65 | 2150
65 | 2150
65 | 2150
100 | 2500
100 | 2500
100 | 2500
100 | 2500
100 | 2500
100 | 2500
100 | 2500</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Ateret)]]></author>
			<pubDate>Wed, 20 Jan 2021 12:37:38 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=3528#p3528</guid>
		</item>
		<item>
			<title><![CDATA[Re: HM-10 на чипе CC2541]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=1106#p1106</link>
			<description><![CDATA[<p>Программа из примера - вкл-выкл диода.</p>]]></description>
			<author><![CDATA[null@example.com (Ivan-07)]]></author>
			<pubDate>Fri, 01 Dec 2017 07:37:55 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=1106#p1106</guid>
		</item>
		<item>
			<title><![CDATA[Re: HM-10 на чипе CC2541]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=1104#p1104</link>
			<description><![CDATA[<p>скорее всего задержка вызвана вашим кодом программы, который вы добавили</p>]]></description>
			<author><![CDATA[null@example.com (remotexy)]]></author>
			<pubDate>Fri, 01 Dec 2017 06:06:41 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=1104#p1104</guid>
		</item>
		<item>
			<title><![CDATA[HM-10 на чипе CC2541]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=1101#p1101</link>
			<description><![CDATA[<p>Добрый день. Подключил этот модуль <a target="_blank" href="https://ru.aliexpress.com/item/AT-09-Android-IOS-HM-10-BLE-Bluetooth-4-0-CC2540-CC2541-Serial-Wireless-Module/32686874533.html?spm=a2g0s.9042311.0.0.zjKSbk">https://ru.aliexpress.com/item/AT-09-An … 0.0.zjKSbk</a>. Вроде работает но очень сильно тормозит. Диод загорается и выкл прим. с задержкой 2 сек. Подскажите что не так.<br />PS в приложении определяется как BT-05</p>]]></description>
			<author><![CDATA[null@example.com (Ivan-07)]]></author>
			<pubDate>Thu, 30 Nov 2017 19:20:47 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=1101#p1101</guid>
		</item>
	</channel>
</rss>
