<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[RemoteXY community — How to check to see which page is displayed when using the page button]]></title>
		<link>https://forum.remotexy.com/viewtopic.php?id=1689</link>
		<atom:link href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=1689&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in How to check to see which page is displayed when using the page button.]]></description>
		<lastBuildDate>Mon, 14 Aug 2023 13:15:38 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: How to check to see which page is displayed when using the page button]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=5179#p5179</link>
			<description><![CDATA[<div class="quotebox"><cite>barbie4364 wrote:</cite><blockquote><p>I am going to give this a try.&nbsp; This may work beautifully for my project as a workaround.</p><p>Thank you!</p></blockquote></div><p>You can also use buttons behind the page buttons, but you&#039;d have to write code to see which Page button has been pressed ...</p><p>e.g.<br /></p><div class="codebox"><pre><code>if(RemoteXY.Page_Button_1) Page_Number = 0;
if(RemoteXY.Page_Button_2) Page_Number = 1;
if(RemoteXY.Page_Button_3) Page_Number = 2;
if(RemoteXY.button_1) Button_Number = 1;
if(RemoteXY.button_2) Button_Number = 2;
if(RemoteXY.button_3) Button_Number = 3;
if(RemoteXY.button_4) Button_Number = 4;
if(RemoteXY.button_5) Button_Number = 5;
if(RemoteXY.button_6) Button_Number = 6;
if(RemoteXY.button_7) Button_Number = 7;
if(RemoteXY.button_8) Button_Number = 8;
if(RemoteXY.button_9) Button_Number = 9;
if(RemoteXY.button_10) Button_Number = 10;
if(RemoteXY.button_11) Button_Number = 11;
if(RemoteXY.button_12) Button_Number = 12;
if(RemoteXY.button_13) Button_Number = 13;
if(RemoteXY.button_14) Button_Number = 14;
if(RemoteXY.button_15) Button_Number = 15;

RemoteXY.Button_No = (Page_Number * Buttons_Per_Page) + Button_Number;</code></pre></div><p>This gives me 45 buttons, spread across 3 Pages, using only 15 + 3 = 18 buttons. For each set of 15 buttons there is only 1 more button variable needed, so it becomes very efficient for multiple pages.</p><p>Remember to reset (to zero) the RemoteXY.Button_No variable after you have actioned each button.</p>]]></description>
			<author><![CDATA[null@example.com (Daba)]]></author>
			<pubDate>Mon, 14 Aug 2023 13:15:38 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=5179#p5179</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to check to see which page is displayed when using the page button]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=5178#p5178</link>
			<description><![CDATA[<p>I am going to give this a try.&nbsp; This may work beautifully for my project as a workaround.</p><p>Thank you!</p>]]></description>
			<author><![CDATA[null@example.com (barbie4364)]]></author>
			<pubDate>Sun, 13 Aug 2023 21:19:23 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=5178#p5178</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to check to see which page is displayed when using the page button]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=5177#p5177</link>
			<description><![CDATA[<p>Ok, so I managed to get something working ...</p><p>It uses the fact that overlapping or overlaid objects will all respond, so I simply put my &quot;Page&quot; buttons on top of the segments of a &quot;Selector&quot;. Obviously I had to hide as much of the selector as I could.</p><p>Tested and it does work, but could probably be improved upon.</p><p>It was configured and compiled for a Wemos D1 mini, but could be changed for any supported module.</p><p>Here&#039;s link to the sample RemoteXY project...&nbsp; &nbsp;<a target="_blank" href="https://remotexy.com/en/editor/773b211cb682f5b1762d6c1a4cd64748/">https://remotexy.com/en/editor/773b211c … a4cd64748/</a></p><p>and here&#039;s the code I used ...</p><div class="codebox"><pre><code>// Demonstration of how to get the currently displayed
// RemoteXY Page into your sketch. Currently this is not
// available from RemoteXY.
//
// It uses a &quot;hidden&quot; Selector which is overlayed with
// the Page buttons.
// 
// When a Page button is pressed, it will also set the 
// Selector to a value that can be used in your sketch to
// determine what page is being displayed.

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

// RemoteXY select connection mode and include library 
#define REMOTEXY_MODE__ESP8266WIFI_LIB_POINT
#include &lt;ESP8266WiFi.h&gt;

#include &lt;RemoteXY.h&gt;

// RemoteXY connection settings 
#define REMOTEXY_WIFI_SSID &quot;PageNumber&quot;
#define REMOTEXY_WIFI_PASSWORD &quot;&quot;
#define REMOTEXY_SERVER_PORT 6377


// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =   // 93 bytes
  { 255,3,0,0,0,86,0,16,24,4,3,3,6,13,13,36,0,24,24,131,
  1,3,13,18,10,3,2,31,80,103,46,49,0,7,21,76,25,13,9,0,
  2,26,2,131,0,3,25,18,10,1,2,31,80,103,46,50,0,131,0,3,
  37,18,10,2,2,31,80,103,46,51,0,129,0,41,27,33,5,0,17,67,
  117,114,114,114,101,110,116,32,80,97,103,101,0 };
  
// this structure defines all the variables and events of your control interface 
struct {

    // input variables
  uint8_t select_1; // =0 if select position A, =1 if position B, =2 if position C, ... 
  int16_t edit_1;  // 32767.. +32767 

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

} RemoteXY;
#pragma pack(pop)

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


int16_t Page_No;    // 

void setup() {
RemoteXY_Init();
}

void loop() {
RemoteXY_Handler();

// get the selector position
Page_No = RemoteXY.select_1 + 1; //selector starts at 0

// display the page number (optional)
// if you are going to do this, it should really be a &quot;text&quot;
// object, but it really doesn&#039;t matter unless you
// inadvertantly press it.
RemoteXY.edit_1 = Page_No;

// just to simulate your code
delay(100);
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Daba)]]></author>
			<pubDate>Sun, 13 Aug 2023 16:00:58 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=5177#p5177</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to check to see which page is displayed when using the page button]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=5176#p5176</link>
			<description><![CDATA[<div class="quotebox"><cite>barbie4364 wrote:</cite><blockquote><p>I wish there were instructions for all of the available options, but there is no documentation on how to use quite a few of them.</p><p>Hopefully we will see these things soon.</p></blockquote></div><p>I wouldn&#039;t hold your breath, responsiveness of RemoteXY is not great at the best of times.</p><p>On the Page buttons issue, I would also prefer the page button for the current page to be hidden. There is no point having a button to reload the current page ....</p><p>I have a thought about how we can &quot;engineer&quot; a Page Number variable, but it will need testing before I release it..</p>]]></description>
			<author><![CDATA[null@example.com (Daba)]]></author>
			<pubDate>Sun, 13 Aug 2023 13:26:43 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=5176#p5176</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to check to see which page is displayed when using the page button]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=5175#p5175</link>
			<description><![CDATA[<p>Thanks Daba for the reply.&nbsp; I really wish we could check which page is displayed.&nbsp; I was hoping I had just overlooked instructions on how to do it.</p><p>I wish there were instructions for all of the available options, but there is no documentation on how to use quite a few of them.</p><p>Hopefully we will see these things soon.</p><p>Again, thanks for the reply.</p>]]></description>
			<author><![CDATA[null@example.com (barbie4364)]]></author>
			<pubDate>Sat, 12 Aug 2023 20:43:15 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=5175#p5175</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to check to see which page is displayed when using the page button]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=5174#p5174</link>
			<description><![CDATA[<p>Currently there is no feedback to the MCU which &quot;page&quot; is being displayed, and it would be a feature that would have profound benefits.</p><p>Currently I am embarking on a project where I can envisage, say, 16 buttons on each of, say 10 pages.&nbsp; That will require 160 declared variables, and a huge amount of editing the button configurations.</p><p>Much simpler would be to allow the 16 buttons to be on every page, 16 declared variables, and one more variable for a &quot;page number&quot; or page name if need be.&nbsp; 160 down to 17 would be a huge advantage in terms of bandwidth used.&nbsp; &nbsp;We can always use the button states associated with an indicated page to decide in our code what happens.</p><p>I fear that the developer either has lost interest, or doesn&#039;t have the time to consider various &quot;enhancements&quot; that would make RemoteXY the market leader.</p><p>I would also like to see boolean button &quot;groups&quot;, allowing for up to 32 buttons to be transmitted in one variable, instead of a byte for each.</p><p>There are so many things that could be done&nbsp; ....</p>]]></description>
			<author><![CDATA[null@example.com (Daba)]]></author>
			<pubDate>Sat, 12 Aug 2023 19:45:27 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=5174#p5174</guid>
		</item>
		<item>
			<title><![CDATA[How to check to see which page is displayed when using the page button]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=5173#p5173</link>
			<description><![CDATA[<p>I am using two page buttons.&nbsp; Is there a way to check to see which page is the currently displayed page?</p>]]></description>
			<author><![CDATA[null@example.com (barbie4364)]]></author>
			<pubDate>Sat, 12 Aug 2023 02:34:37 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=5173#p5173</guid>
		</item>
	</channel>
</rss>
