<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[RemoteXY community — Помогите начинающему]]></title>
	<link rel="self" href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=1430&amp;type=atom" />
	<updated>2021-12-16T20:20:11Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.remotexy.com/viewtopic.php?id=1430</id>
		<entry>
			<title type="html"><![CDATA[Re: Помогите начинающему]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=4401#p4401" />
			<content type="html"><![CDATA[<p>Спасибо.<br />Исправил, прошивается, соединяется ,но не работает.?</p>]]></content>
			<author>
				<name><![CDATA[uuu000]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=2021</uri>
			</author>
			<updated>2021-12-16T20:20:11Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=4401#p4401</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Помогите начинающему]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=4400#p4400" />
			<content type="html"><![CDATA[<p>In your RemoteXY editor code you have...</p><div class="codebox"><pre><code>    // input variables
  uint8_t button_1; // =1 если кнопка нажата, иначе =0 </code></pre></div><p>And <strong>button_1</strong> is the reference used in the rest of the code.</p><p>But in your &quot;combined&quot; code you have it as this...</p><div class="codebox"><pre><code>    // input variables
  uint8_t button_0; // =1 если кнопка нажата, иначе =0 </code></pre></div>]]></content>
			<author>
				<name><![CDATA[Gunner]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=1840</uri>
			</author>
			<updated>2021-12-16T19:47:45Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=4400#p4400</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Помогите начинающему]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=4398#p4398" />
			<content type="html"><![CDATA[<p>Друзья,помогите новичку.<br />Не могу понять как разместить скачанный после создания интерфейса скетч в тело моей программы (включение и выключение светодиода<br />кнопкой)&nbsp; Имею начальные навыки программирования AVR в СИ, но здесь ничего не могу сделать <br /></p><div class="codebox"><pre><code>#define LED 5 // D1(gpio5)
#define BUTTON 4 //D2(gpio4)
//Let&#039;s say you have your push button on pin 4
int switchState = 0; // actual read value from pin4
int oldSwitchState = 0; // last read value from pin4
int lightsOn = 0; // is the switch on = 1 or off = 0

void setup() { 
 pinMode(BUTTON, INPUT); // push button 
 pinMode(LED, OUTPUT); // anything you want to control using a switch e.g. a Led
}
void loop() {
 switchState = digitalRead(BUTTON); // read the pushButton State
 if (switchState != oldSwitchState) // catch change
 {
 oldSwitchState = switchState;
 if (switchState == HIGH)
 {
 // toggle
 lightsOn = !lightsOn;
 }
 }
 if(lightsOn)
 {
 digitalWrite(LED, HIGH); // set the LED on
 } else {
 digitalWrite(LED, LOW); // set the LED off
 }
 }</code></pre></div><br /><p>Скачанный скетч<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 3.1.6 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.8.01 or later version;
     - for iOS 1.5.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__ESP8266WIFI_LIB
#include &lt;ESP8266WiFi.h&gt;

#include &lt;RemoteXY.h&gt;

// настройки соединения 
#define REMOTEXY_WIFI_SSID &quot;HOTBOX 4-7EA8&quot;
#define REMOTEXY_WIFI_PASSWORD &quot;0507769926&quot;
#define REMOTEXY_SERVER_PORT 6377


// конфигурация интерфейса  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,1,0,1,0,23,0,13,13,1,
  70,32,43,7,9,9,26,37,135,0,
  1,0,19,6,12,12,2,31,88,0 };
  
// структура определяет все переменные и события вашего интерфейса управления 
struct {

    // input variables
  uint8_t button_1; // =1 если кнопка нажата, иначе =0 

    // output variables
  uint8_t led_1; // led state 0 .. 2 

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

} RemoteXY;
#pragma pack(pop)

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

#define PIN_BUTTON_1 D2


void setup() 
{
  RemoteXY_Init (); 
  
  pinMode (PIN_BUTTON_1, OUTPUT);
  
  // TODO you setup code
  
}

void loop() 
{ 
  RemoteXY_Handler ();
  
  digitalWrite(PIN_BUTTON_1, (RemoteXY.button_1==0)?LOW:HIGH);
  
  // TODO you loop code
  // используйте структуру RemoteXY для передачи данных
  // не используйте функцию delay() 


}</code></pre></div><p>Попробовал совместить<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 3.1.6 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.8.01 or later version;
     - for iOS 1.5.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__ESP8266WIFI_LIB
#include &lt;ESP8266WiFi.h&gt;

#include &lt;RemoteXY.h&gt;

// настройки соединения 
#define REMOTEXY_WIFI_SSID &quot;HOTBOX 4-7EA8&quot;
#define REMOTEXY_WIFI_PASSWORD &quot;0507769926&quot;
#define REMOTEXY_SERVER_PORT 6377


// конфигурация интерфейса  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,1,0,1,0,23,0,13,13,1,
  70,32,43,7,9,9,26,37,135,0,
  1,0,19,6,12,12,2,31,88,0 };
  
// структура определяет все переменные и события вашего интерфейса управления 
struct {

    // input variables
  uint8_t button_0; // =1 если кнопка нажата, иначе =0 

    // output variables
  uint8_t led_1; // led state 0 .. 2 

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

} RemoteXY;
#pragma pack(pop)

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

#define PIN_BUTTON_1 D2


#define LED 5 // D1(gpio5)
#define BUTTON 4 //D2(gpio4)
//Let&#039;s say you have your push button on pin 4
int switchState = 0; // actual read value from pin4
int oldSwitchState = 0; // last read value from pin4
int lightsOn = 0; // is the switch on = 1 or off = 0

void setup() { 
 RemoteXY_Init (); 
 pinMode(BUTTON, INPUT); // push button 
 pinMode(LED, OUTPUT); // anything you want to control using a switch e.g. a Led
}
void loop() {

  RemoteXY_Handler ();
   digitalWrite(PIN_BUTTON_1, (RemoteXY.button_1==0)?LOW:HIGH);
 switchState = digitalRead(BUTTON); // read the pushButton State
 if (switchState != oldSwitchState) // catch change
 {
 oldSwitchState = switchState;
 if (switchState == HIGH)
 {
 // toggle
 lightsOn = !lightsOn;
 }
 }
 if(lightsOn)
 {
 digitalWrite(LED, LOW); // set the LED on
 } else {
 digitalWrite(LED, HIGH); // set the LED off
 }
 }</code></pre></div><p>и получил такую ошибку<br />&#039;struct&lt;unnamed&gt;&#039; has no member named &#039;button_1&#039;; did you mean &#039;button_0&#039;?<br />Где искать эту ошибку?</p><p>Спасибо.</p>]]></content>
			<author>
				<name><![CDATA[uuu000]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=2021</uri>
			</author>
			<updated>2021-12-16T13:24:09Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=4398#p4398</id>
		</entry>
</feed>
