Showing posts with label ESP8266Basic. Show all posts
Showing posts with label ESP8266Basic. Show all posts

Wednesday, August 24, 2016

Slicing pictures (4) using it for IRremote

The slicing of pictures of a remote control and using it for InfraRed remotes with IRcodes measured with IRsensor on ESP8266 ( or Arduino ).
Currently i store the IR remote codes from each remote control in a spreadsheet with tabs/pages for each remote control.
There are columns in the spreadsheet with
  • The IR code
  • The location A01 B01 etc on the remote control
  • Text on the remote control button (As text, for numbers enter ‘1 to force 1 as text
  • Remote control function without special characters ( FF,  not >> etc.)
From this you can make in other columns the HTML code for a table:
Use something like this as a starting point.  
<table>
<tr><td> A01.jpg </td>
<td>       B01.jpg </td>
<td>       C01.jpg </td>
<td>       D01.jpg </td></tr>
<tr><td> A02.jpg </td>
<td>       B02.jpg </td>
<td>       C02.jpg </td>
<td>       D02.jpg </td></tr>
</table>


Change code to display the picture  <img src="A01.jpg" > with formulas in your spreadsheet.  
Add the IRcontrol code and the function description as output in your table. You can also use the spreadsheet to create ( ESP8266Basic ) programming code like


Let IRcode_Power = “012435”
Let IRcode_Mute = “013335”
Let IRcode_CannelPlus  = “022435”
Let IRcode_CannelPlus  = “025535”
Let IRcode_VolumePlus  = “062235”
Let IRcode_VolumeMinus  = “061135”
Let IRcode_1 = “014435”
Let IRcode_2 = “015535”
Let IRcode_3 = “016635”
Let IRcode_FF  = “051135”
Let IRcode_FB  = “052235”


To avoid programming code like  Let IRcode_>>  = “051135” i included in the spreadsheet not only >> >| but also a column with the function without special characters (  FF Play , Pause,  Stop.)
The data from the spreadsheet can also be pushed an ( MySQL ) database to use it with a home automation system.

Monday, August 22, 2016

ESP8266_KY015


I already had tested an DHT11 module with the ESP8266. Now i also tested the DHT11 temperature / humidity sensor on the 37in1 module KY015 with ESP8266Basic

Hardware connections

-         GND
middle VCC 3V3
S        Signal line - ESP8266 Pin 5

Program

' TestKY015.bas
PinDHT11 = 5

DHT.SETUP( 11 , PinDHT11 )
cls

print "<br>Pin : " & PinDHT11 & "<br>Time : " & time() & "<br>Temperature : " & DHT.TEMP() & "<br>Humidity :" & DHT.HUM()

end

Thursday, August 18, 2016

ESP8266_KY-006_Small_passive_buzzer_module

This is the test of the KY-006 passive buzzer in the 37in1 "Arduino" sensor kit
 with ESP8266Basic.
On my blog you can also find a test of KY-006 with Arduino.
Hardware

Pin S ESP8266 Pin 5
Pin (middle) not connected
Pin - GND ESP8266 Ground


' Test KY006
cls
PinBuz = 5
pwBuz = 0
pwBuzMax = 500

html | <h1>Test KY006 Buzzer</h1> |
html | <table> |
html | <tr><td> |
button "0", [SetPinBuz0]
html | </td><td> |
slider pwBuz , 0 , pwBuzMax
html | </td><td> |
button "Max", [SetPinBuzMax] 

html | </td></tr><tr><td> |
button "SetSliders" , [SetSliders]
html | </td><td><center> |
button "SlidersMid" , [SetPinBuzMid]
html | </center></td><td> |
button " Exit ", [Exit]
html | </td></tr></table> |

wait

[SetPinBuz0]
pwBuz = 0
Goto [SetSliders]

[SetPinBuzMid]
pwBuz = pwBuzMax / 2
Goto [SetSliders]

[SetPinBuzMax]
pwBuz = pwBuzMax
Goto [SetSliders]

[SetSliders]
io(pwo,PinBuz,pwBuz)
wait

[Exit]
end



Tuesday, August 16, 2016

IR codes LG remote control


IR codes received on ESP8266
with ESP8266Basic from
IR remote control LG ( TV )






Mute
82b:RC5:12


Power
820:RC5:12


1
811:RC5:12


2
812:RC5:12


3
813:RC5:12

AV/TV
AV_TV
82a:RC5:12


4
814:RC5:12


5
815:RC5:12


6
816:RC5:12


SWAP
827:RC5:12


7
817:RC5:12


8
818:RC5:12


9
819:RC5:12

16:9
16-9
823:RC5:12

-/--
2dig
81a:RC5:12


0
810:RC5:12


PRup
81c:RC5:12


i
82f:RC5:12

TV/TXT
TV-TXT
831:RC5:12

VOLmin
825:RC5:12


SEL
828:RC5:12

VOL>
VOLplus
824:RC5:12


MENU
829:RC5:12


MIX
804:RC5:12


PRdown
81b:RC5:12


UPDATE
80f:RC5:12


RED
826:RC5:12


GREEN
82c:RC5:12

YELLOW (TIMER)
YELLOW
82e:RC5:12

BLUE ( PP)
BLUE
833:RC5:12

In ESP8266 Basic

let IR_Mute = "82b:RC5:12"
let IR_Power = "820:RC5:12"
let IR_1 = "811:RC5:12"
let IR_2 = "812:RC5:12"
let IR_3 = "813:RC5:12"
let IR_AV_TV = "82a:RC5:12"
let IR_4 = "814:RC5:12"
let IR_5 = "815:RC5:12"
let IR_6 = "816:RC5:12"
let IR_SWAP = "827:RC5:12"
let IR_7 = "817:RC5:12"
let IR_8 = "818:RC5:12"
let IR_9 = "819:RC5:12"
let IR_16-9 = "823:RC5:12"
let IR_2dig = "81a:RC5:12"
let IR_0 = "810:RC5:12"
let IR_PRup = "81c:RC5:12"
let IR_i = "82f:RC5:12"
let IR_TV-TXT = "831:RC5:12"
let IR_VOLmin = "825:RC5:12"
let IR_SEL = "828:RC5:12"
let IR_VOLplus = "824:RC5:12"
let IR_MENU = "829:RC5:12"
let IR_MIX = "804:RC5:12"
let IR_PRdown = "81b:RC5:12"
let IR_UPDATE = "80f:RC5:12"
let IR_RED = "826:RC5:12"
let IR_GREEN = "82c:RC5:12"
let IR_YELLOW = "82e:RC5:12"
let IR_BLUE = "833:RC5:12"




Monday, August 15, 2016

ESP8266_KY-012_Active_buzzer_module

The active buzzer ( KY-012 ) continuously makes sound and only needs power to function.
I already had tested this buzzer module with my Arduino.

Testing buzzer direct connecting to power  ( 3.3 V )
  • module Pin  -    VCC
  • Pin (middel) not connected
  • module Pin S     GND
Module gives sound, volume low !!


With ESP8266Basic program :
  • Pin - ESP output pin
  • Pin (middel) not connected
  • Pin S ESP8266 Ground 
Using the ESP8266Basic program below
 [Pin Buzzer High] button switches my buzzer on.
 [Pin Buzzer Low] button switches my buzzer off.

' TestKY012_Buzzer.bas
' 2016 J.Jeronimus
cls
PinBuz = 5

html | <h1>Testing Active buzzer KY-012</h1> |
html | Connected to pin | &  PinBuz & | <br><br> |

button "Set Pin Buzzer High", [SetPinBuzHigh] 
html | <br><br> |
button "Set Pin Buzzer Low", [SetPinBuzLow] 
html | <br><br> |
button " Exit", [Exit] 
html | <br> |

wait 

[SetPinBuzLow] 
io(po,PinBuz,0) 
wait 

[SetPinBuzHigh] 
io(po,PinBuz,1) 
wait 
[Exit] 
end


Alternatively you can connect
  • Pin - ESP VCC ( 3V3 )
  • Pin (middel) not connected
  • Pin S ESP8266 output pin 5 
Using the same ESP8266Basic program
 [Pin Buzzer High] button switches buzzer off.
 [Pin Buzzer Low] button switches buzzer on.

Wednesday, August 10, 2016

ESP8266Basic KY-004 - Button module

Tested 37in1 SensorKit "arduino" module KY-004 now with ESP8266 / ESP8266Basic

KY-004 37-1 Key switch module

Hardware connection
  • Pin S              Signal - PinIn  = 2
  • Pin middel       VCC +3V3
  • Pin -               Ground

The ESP8266Basic program

' TestKY004
' This TestPinIn.bas
' Program to test the value of PinIn and display it

PinIn = 2

timer 1000 , [NewVal]

wait

[NewVal]
cls
msg$ = "<head><meta http-equiv='refresh' content='1'></head><H1>TestPinInn</H1>" &  time() & " Pin ( " &  PinIn & " ) = " & io( pi , PinIn  )
html htmlvar( msg$ )

returngui

wait

end







Tuesday, August 9, 2016

IRcodes remote control Daewoo



IR codes received on ESP8266 with ESP8266Basic from 
IR remote control "Deawoo". 


The INDEX+ and INDEX- send 2 IR codes !


 

Power
8fc6767c:UNKNOWN:32







?
No IRcode !!

 1
44a3774:UNKNOWN:32

2
47f374a1:UNKNOWN:32

3
8d9d8908:UNKNOWN:32
TV/VCR
b883a503:UNKNOWN:32
4
63bc195d:UNKNOWN:32
5
7ac1e53e:UNKNOWN:32
6
9eddaa2d:UNKNOWN:32
AV
9db921ef:UNKNOWN:32
7
36b3537c:UNKNOWN:32
8
97b9de41:UNKNOWN:32
9
26dd55e2:UNKNOWN:32
[A]
5d95d0c6:UNKNOWN:32
>>30
fw30

bc09bea5:UNKNOWN:32
0

3f70007b:UNKNOWN:32
FW

73f78e32:UNKNOWN:32
EJECT

91c62b02:UNKNOWN:32
PAUSE
eaa43c9e:UNKNOWN:32
FB
2a6b6f3d:UNKNOWN:32
PLAY
39b909d9:UNKNOWN:32
FF
9bd7f3d0:UNKNOWN:32

STOP
dfe68592:UNKNOWN:32

RECORD

61996f77:UNKNOWN:32

SP_LP

2ddff2aa:UNKNOWN:32
PR+
PRplus
1d0d58a6:UNKNOWN:32

MENU

ba778113:UNKNOWN:32
PAL_SEC

19873f04:UNKNOWN:32
<-
LEFT
56ebfb2:UNKNOWN:32
OK

cef6687c:UNKNOWN:32
->
RIGHT
aa90f990:UNKNOWN:32
INDEXminus
3451c218:UNKNOWN:32
2e4bd322:UNKNOWN:32
INDEXplus
8ec21146:UNKNOWN:32
b766ae64:UNKNOWN:32

 PRminus
1a0a930d:UNKNOWN:32

A_SEL
a7b10aff:UNKNOWN:32




ESP8266 basic:

IR_Power = "8fc6767c:UNKNOWN:32"
IR_1 = "44a3774:UNKNOWN:32"
IR_2 = "47f374a1:UNKNOWN:32"
IR_3 = "8d9d8908:UNKNOWN:32"
IR_TV_VCR = "b883a503:UNKNOWN:32"
IR_4 = "63bc195d:UNKNOWN:32"
IR_5 = "7ac1e53e:UNKNOWN:32"
IR_6 = "9eddaa2d:UNKNOWN:32"
IR_AV = "9db921ef:UNKNOWN:32"
IR_7 = "36b3537c:UNKNOWN:32"
IR_8 = "97b9de41:UNKNOWN:32"
IR_9 = "26dd55e2:UNKNOWN:32"
IR_A = "5d95d0c6:UNKNOWN:32"
IR_fw30 = "bc09bea5:UNKNOWN:32"
IR_0 = "3f70007b:UNKNOWN:32"
IR_PLAY = "73f78e32:UNKNOWN:32"
IR_EJECT = "91c62b02:UNKNOWN:32"
IR_PAUSE = "eaa43c9e:UNKNOWN:32"
IR_FB = "2a6b6f3d:UNKNOWN:32"
IR_PLAY = "39b909d9:UNKNOWN:32"
IR_FF = "9bd7f3d0:UNKNOWN:32"
IR_STOP = "dfe68592:UNKNOWN:32"
IR_RECORD = "61996f77:UNKNOWN:32"
IR_SP_LP = "2ddff2aa:UNKNOWN:32"
IR_PRplus = "1d0d58a6:UNKNOWN:32"
IR_MENU = "ba778113:UNKNOWN:32"
IR_PAL_SEC = "19873f04:UNKNOWN:32"
IR_PREV = "56ebfb2:UNKNOWN:32"
IR_OK = "cef6687c:UNKNOWN:32"
IR_NEXT = "aa90f990:UNKNOWN:32"
IR_INDEXplus1 = "3451c218:UNKNOWN:32"
IR_INDEXplus2 = "2e4bd322:UNKNOWN:32"
IR_INDEXminus1 = "8ec21146:UNKNOWN:32"
IR_INDEXminus2 = "b766ae64:UNKNOWN:32"
IR_PRminus = "1a0a930d:UNKNOWN:32"
IR_A_SEL = "a7b10aff:UNKNOWN:32"