<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[RemoteXY community — не работает remouteXY с библиотекой CustomStepper]]></title>
		<link>https://forum.remotexy.com/viewtopic.php?id=658</link>
		<atom:link href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=658&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in не работает remouteXY с библиотекой CustomStepper.]]></description>
		<lastBuildDate>Thu, 17 Jan 2019 18:55:39 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[не работает remouteXY с библиотекой CustomStepper]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=1983#p1983</link>
			<description><![CDATA[<p>подключаю двигатель 28byj-48 в flprog через бибиотеку CustomStepper&nbsp; и не чего не работает </p><div class="codebox"><pre><code>#define REMOTEXY_MODE__HARDSERIAL
#include &lt;RemoteXY.h&gt;
#include &lt;CustomStepper.h&gt;
#define REMOTEXY_SERIAL Serial
#define REMOTEXY_SERIAL_SPEED 9600
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] = {5, 60, 128, 0, 8, 13, 0, 66, 65, 0, 10, 10, 45, 2, 26, 66, 65, 12, 10, 10, 45, 2, 26, 66, 65, 24, 10, 10, 45, 2, 26, 66, 65, 36, 10, 10, 45, 2, 26, 66, 65, 48, 10, 10, 45, 2, 26, 4, 64, 1, 11, 7, 46, 2, 26, 4, 64, 13, 11, 7, 46, 2, 26, 4, 64, 25, 11, 7, 46, 2, 26, 4, 64, 37, 11, 7, 46, 2, 26, 4, 64, 49, 11, 7, 46, 2, 26, 67, 4, 1, 3, 9, 5, 2, 26, 11, 67, 4, 13, 3, 9, 5, 2, 26, 11, 67, 4, 25, 3, 9, 5, 2, 26, 11, 67, 4, 37, 3, 9, 5, 2, 26, 11, 67, 4, 48, 3, 9, 5, 2, 26, 11};
struct {
signed char slider_1;
signed char slider_2;
signed char slider_3;
signed char slider_4;
signed char slider_5;
signed char level_1;
signed char level_2;
signed char level_3;
signed char level_4;
signed char level_5;
char text_1[11];
char text_2[11];
char text_3[11];
char text_4[11];
char text_5[11];
 unsigned char connect_flag;
} RemoteXY;
#pragma pack(pop) 
unsigned long rotateN_86424465_1;
bool cw_86424465_1;
bool ccw_86424465_1;
int _rotate_86424465_1;
bool done_86424465_1;
CustomStepper stepper_86424465_1( 31, 33, 35, 37 );
bool _cw_86424465_1=0;
bool _ccw_86424465_1=0;
int _PWDC = 0;
int _gtv1;
unsigned long _gtv2;
bool _gtv4;
int _gtv5;
bool _gtv7;
bool _count2I = 0;
unsigned long _count2_Value = 0UL;
bool _count2MaxLO = 0;
bool _count2MinLO = 0;
void setup()
{
RemoteXY_Init ();
TCCR2A = 0x00;
TCCR2B =  0x07;
TIMSK2=0x01;
TCNT2=100;
stepper_86424465_1.setRPM( 12 ); 
stepper_86424465_1.setSPR( 4075 );
stepper_86424465_1.setDirection( 0 );
stepper_86424465_1.rotate(0);

}
void loop()
{RemoteXY_Handler  ();
_PWDC = 0;





//Плата:1
//Комментарии:rw6cm
if (_gtv4){_count2_Value = 0;} else {
if (0){
if ( ! _count2I) { 
_count2I = 1;
if ((_gtv5) &gt;= (_gtv1)){if(_count2_Value &lt; (_gtv5)) {_count2_Value = _count2_Value + 1;}} else{ if(_count2_Value &gt; (_gtv5)) {_count2_Value = _count2_Value - 1;} }
}} else {
_count2I = 0;}
}
_count2MaxLO = _count2_Value &gt;= (_gtv5); 
_count2MinLO = _count2_Value &lt;= (_gtv5); 
_gtv1 = _count2_Value;
rotateN_86424465_1 = _count2_Value;
cw_86424465_1 = !(_count2MaxLO);
ccw_86424465_1 = !(_count2MinLO);
if( (cw_86424465_1)&amp;&amp;(!_cw_86424465_1)) { stepper_86424465_1.setDirection(1); stepper_86424465_1.rotate( rotateN_86424465_1 );}_cw_86424465_1=cw_86424465_1;
if( (ccw_86424465_1)&amp;&amp;(!_ccw_86424465_1)) { stepper_86424465_1.setDirection(2); stepper_86424465_1.rotate( rotateN_86424465_1 );}_ccw_86424465_1=ccw_86424465_1;
if (!cw_86424465_1 &amp;&amp; !ccw_86424465_1 &amp;&amp; (rotateN_86424465_1&lt;1) ){stepper_86424465_1.setDirection( 0 );}
if(stepper_86424465_1.isDone() ) { stepper_86424465_1.rotatGone = rotateN_86424465_1 ; }
stepper_86424465_1.run();
done_86424465_1=stepper_86424465_1.isDone();
_rotate_86424465_1 =  rotateN_86424465_1 - stepper_86424465_1.rotatGone;
_gtv2 = _gtv5;

//Плата:2
((String(_gtv1, DEC))).toCharArray((RemoteXY.text_1), 11);
(String(&quot;&quot;)).toCharArray((RemoteXY.text_2), 11);
((String(_gtv2, DEC))).toCharArray((RemoteXY.text_3), 11);
RemoteXY.level_1 = _gtv1;
((String((char(_gtv7)), DEC))).toCharArray((RemoteXY.text_4), 11);
(String(&quot;&quot;)).toCharArray((RemoteXY.text_5), 11);
RemoteXY.level_2 = 0;
RemoteXY.level_3 = 0;
RemoteXY.level_4 = 0;
RemoteXY.level_5 = 0;
_gtv5 = (RemoteXY.slider_1);




}

ISR(TIMER2_OVF_vect)
{ TCNT2=100;
if(_PWDC &gt;= 1000){asm volatile (&quot;jmp 0x0000&quot;);}else{_PWDC = _PWDC+1;};
}</code></pre></div><p>ак будто конфлик библиотек, может кто сталкивался</p>]]></description>
			<author><![CDATA[null@example.com (chylan)]]></author>
			<pubDate>Thu, 17 Jan 2019 18:55:39 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=1983#p1983</guid>
		</item>
	</channel>
</rss>
