-->
Page 2 of 14

Re: IR demo code with ESPBasic alpha 21

PostPosted: Tue May 03, 2016 10:01 pm
by forlotto
Hrmmm I could see a use for this if codes can be repeated they are being captured somewhere before being repeated it should be possible to create a program that does the following:

Asks for a model of the device you are controlling.
Asks you to push a button or gives you the option to skip this button if it is not used.
Stores the data for that button under the model of the device.
Once the data is gathered the last prompt will write all this data to a file a remote configuration.

Then modify this program to load the remote data from a drop down menu when selected dynamically things will change to work for this remote that is selected...

Call me a dreamer but wouldn't something like this be possible at a point we could have a sub forum dedicated to IR remote configurations and people sharing them to make life even easier yet.

Just a wild thought I mean when you take a look at a universal remote you cant tell me the hardware is anywhere near as good as the esp8266 I would think remote control emulation at this level would indeed be possible.

Re: IR demo code with ESPBasic alpha 21

PostPosted: Wed May 04, 2016 2:00 am
by Electroguard
You guys just continue to amaze!

Obviously image maps are specific to a persons image, and we all have different remote controllers, so how did you arrive at your image map coordinates - or more importantly... how could Joe Public derive the required hot-spot coordinates for their own images?

Re: IR demo code with ESPBasic alpha 21

PostPosted: Wed May 04, 2016 3:23 am
by cicciocb
You can simply use windows paint.
Moving the mouse on the image, the coordinates are shown in the lower left corner.
For each button, you need to take the coordinates of the left top corner and the lower right.
As, in general, the buttons are placed in rows and columns, the coordinates are repeated per each line / column.

In the example posted, for example, in the line
Code: Select all<area shape="rect" coords=" 50,135,100,160" onclick="sendIR('ON')">

the coords represent x1, y1, x2, y2 where (x1,y1) is the top left corner and (x2,y2) is the lower right.

Re: IR demo code with ESPBasic alpha 21

PostPosted: Wed May 04, 2016 3:29 am
by Electroguard
Wahay, even I should be able to manage that!

I'm sure that's gonna be a useful tip for many people, thanks.