Author Topic: Adding a touchscreen "like" experience  (Read 414 times)

0 Members and 1 Guest are viewing this topic.

Offline rthorntnTopic starter

  • Frequent Contributor
  • **
  • Posts: 410
  • Country: au
Adding a touchscreen "like" experience
« on: August 04, 2024, 12:08:12 am »
Hi,

I have a nice 13.3" ePaper monitor (Dasung Paperlike Pro) that I want to connect to an RPi and wall mount to use in home automation but I would need a way to input.

So it's not a mouse like experience more like an intuitive button like experience.

For example say I set it up to display 16 information tiles (4x4) I'd like to be able to quickly select a tile to get expanded information, again tiled, and I'd also like a quick way of setting a tile.  I click on say tile 4 (living room), then on the next page, tile 2 (aircon), on this page I guess there are tiles for on/off, mode & temperature, so I should be able to set those things quickly and intuitively.

It would need a way to go back a page.

So how would you approach it, it would have to be small and discrete, I'll probably embed the control mechanism into the monitor case?

Thanks!
« Last Edit: August 04, 2024, 12:24:34 am by rthorntn »
 

Online themadhippy

  • Super Contributor
  • ***
  • Posts: 2820
  • Country: gb
Re: Adding a touchscreen "like" experience
« Reply #1 on: August 04, 2024, 12:26:28 am »
hows about a touch overlay for your screen
 
The following users thanked this post: rthorntn

Offline rthorntnTopic starter

  • Frequent Contributor
  • **
  • Posts: 410
  • Country: au
Re: Adding a touchscreen "like" experience
« Reply #2 on: August 04, 2024, 12:47:07 am »
Any idea if there are overlays that work well and don't cost the earth, it's a 13.3" 4:3 which wont help.
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9162
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Adding a touchscreen "like" experience
« Reply #3 on: August 04, 2024, 02:33:49 am »
A small array of IR LEDs and photodiodes along the edges would be fairly easy to implement.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 
The following users thanked this post: rthorntn

Offline rthorntnTopic starter

  • Frequent Contributor
  • **
  • Posts: 410
  • Country: au
Re: Adding a touchscreen "like" experience
« Reply #4 on: August 04, 2024, 04:18:03 am »
Thanks.

So lets say I go for 12 square tiles (4:3).

And so I have strips, say 12 IR LED/photodiode pairs top to bottom and 16 IR LED/photodiode pairs left to right spaced so there are 16 intersecting points in each tile.  Then I have logic that calls it a press when at least one horizontal and one vertical beam is broken over that tile?
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4075
  • Country: nl
Re: Adding a touchscreen "like" experience
« Reply #5 on: August 04, 2024, 06:17:23 am »
Thanks.

So lets say I go for 12 square tiles (4:3).

And so I have strips, say 12 IR LED/photodiode pairs top to bottom and 16 IR LED/photodiode pairs left to right spaced so there are 16 intersecting points in each tile.  Then I have logic that calls it a press when at least one horizontal and one vertical beam is broken over that tile?

That is the idea. Easily done with a micro processor. To reduce on GPIO pins you can make it a scanning matrix. Either with the use of multiplexers and de-multiplexers or by turning the LED/photodiodes on and off.

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10140
  • Country: nz
Re: Adding a touchscreen "like" experience
« Reply #6 on: August 04, 2024, 08:21:52 am »
Any idea if there are overlays that work well and don't cost the earth, it's a 13.3" 4:3 which wont help.

This one might work. but i'm not sure what you consider expensive.
I'd expect you'd spend more than this in time getting an IR system to work.
https://www.aliexpress.com/item/32809361607.html?spm=a2g0o.detail.1000023.1.d60cvgA7vgA7pp
Greek letter 'Psi' (not Pounds per Square Inch)
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2605
  • Country: us
Re: Adding a touchscreen "like" experience
« Reply #7 on: August 04, 2024, 11:12:13 am »
I did something similar to implement a video switch.
By using a touch screen and grabbing the touch release location (or mouse button-up location), you can then do a search over all your tiles of any size(s) to determine which tile was selected.

I just scanned over an array of tile xy center locations and width and heights:
Code: [Select]
bool isWithin(int xCenter, int yCenter, int width, int height, int cursorX, int cursorY)
{
   int   w2 = width / 2;
   int   h2 = height / 2;

   if ( (cursorX > (xCenter - w2)) && (cursorX < (xCenter + w2)) &&
        (cursorY > (yCenter - h2)) && (cursorY < (yCenter + h2)) ) return(true);

   return(false);
}
You also use the same array to draw the tiles on the screen.
Really pretty painless and easy to change your layout to any size and shape.

Note:  The box on the right side with a wide boarder was used to indicate power on/off.
The user would select a box in the middle (i.e. video source) and then select a box on the right (i.e. monitor) to map the video.  The highlighted boxes show the selection/connection.
« Last Edit: August 04, 2024, 11:15:51 am by MarkF »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf