Topic: Can someone do a test ....
.... I have no hardware at the present time to test this on.
I am about to embark on a project that will have a "matrix" of many buttons.
I am thinking that I may be able to use "Row" and "Column" buttons, intersecting at the places where I want a single button (like a keypad, for instance).
But I need to know whether overlapping buttons both get turned on when touched.
I've done a simple mock-up of the idea - http://remotexy.com/en/editor/5bd016603 … 0ff64f0a0/ where 3 LEDs are controlled by only two buttons - extend this idea to many buttons, and the overheads are drastically reduced.
Feel free to break it apart, it's only two buttons, overlapping behind the pseudo-button B.
The code should be trivial to test it works.
LED_A should light up if button_AB AND NOT button_BC
LED_B should light up if button_AB AND button_BC
LED_C should light up if button_BC AND NOT button_AB
If anyone could spare the time to give this a test I would be grateful...
TIA
Oops, forgot to include the code ....
-- Test Request --
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 select connection mode and include library
#define REMOTEXY_MODE__SOFTSERIAL
#include <SoftwareSerial.h>
#include <RemoteXY.h>
// RemoteXY connection settings
#define REMOTEXY_SERIAL_RX 2
#define REMOTEXY_SERIAL_TX 3
#define REMOTEXY_SERIAL_SPEED 9600
// RemoteXY configurate
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
{ 255,2,0,3,0,121,0,10,13,0,
1,2,15,33,45,13,2,31,0,1,
2,39,33,45,13,2,31,0,65,4,
18,12,10,10,65,4,44,12,10,10,
65,4,70,12,10,10,130,0,14,30,
70,17,13,129,0,29,14,4,6,24,
65,0,129,0,55,14,4,6,24,66,
0,129,0,81,14,4,6,24,67,0,
130,1,17,33,12,11,30,130,1,43,
33,12,11,30,130,1,69,33,12,11,
30,129,0,21,36,4,6,24,65,0,
129,0,47,36,4,6,24,66,0,129,
0,73,36,4,6,24,67,0 };
// this structure defines all the variables and events of your control interface
struct {
// input variables
uint8_t button_AB; // =1 if button pressed, else =0
uint8_t button_BC; // =1 if button pressed, else =0
// output variables
uint8_t led_A_r; // =0..255 LED Red brightness
uint8_t led_B_r; // =0..255 LED Red brightness
uint8_t led_C_r; // =0..255 LED Red brightness
// other variable
uint8_t connect_flag; // =1 if wire connected, else =0
} RemoteXY;
#pragma pack(pop)
/////////////////////////////////////////////
// END RemoteXY include //
/////////////////////////////////////////////
void setup()
{
RemoteXY_Init ();
// TODO you setup code
}
void loop()
{
RemoteXY_Handler ();
// TODO you loop code
// use the RemoteXY structure for data transfer
// do not call delay()
}