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



Wednesday, August 17, 2016

Arduino_Shield_LCD_Keypad

1602 LCD Keypad Shield V2.0 LCD Expansion Board for Arduino

This Arduino shield has LCD , buttons and some connectors / pin to add other hardware


Hardware

  • D4-D7    -> LCD Data transmission
  • D8          -> Register Select  RS
  • D9          -> Enable pin
  • D10        -> Backlight control
  • A0          ->  Buttons

 ( For full schematic diagram see bottom of this blog post.



Up
Select Left
Right RST(Arduino Reset)  


Down



RST is the Arduino reset button

Some of this shields have issues when using D10 / backlight. Read this information
http://forum.arduino.cc/index.php?PHPSESSID=405c15ceb3c97e7b519cfc2241b94dac&topic=96747.0
before trying to use D10 / Backlight.

Test program




Links


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.

Friday, August 12, 2016

Soldering iron (Aliexpress)

On Aliexpress i found a CXG 936d Digital LCD Adjustable temperature Electric Soldering station Electric soldering iron 220V 60W.There are several versions available. I needed 220V and wanted also some additonal tips. I ordered  one at Aliexpress - store Shenzhen Winnertech Electronic technology co., LTD


I knew it would have a non EU power plug but an EU adapter converter is included.
Two weeks after ordering i received my new soldering iron. (For orders from Aliexpress this is real fast!).  All was according to the description.
Using the EU power adapter converter works fine in a standard power socket. However it does not fit in the grounded socket that i used for my previous soldering iron. The soldering iron has a ground wire with a alligator clip (same length as the power cable).
To put it a bit out of the way i used some tie wraps to put it together with the power cable  to just after the power switch in the power cable.
There is a little manual included (see PDF/scan) that i can not read as it is in Chinese.
The soldering iron heats up very fast. With the two buttons on the iron you can adjust the (set)temperature. A dot (and the display of the actual temperature) indicates if the temperature has not yet  reached the setpoint.
I am very happy with this new soldering iron.
Two minus point are
- the power cable (perhaps i will replace it) and
- the Chinese instruction manual (not needed yet to use this nice soldering iron.).







Thursday, August 11, 2016

Slicing pictures (2) Saved selections & slice names

Slicing pictures (1) about SHIFT CRTL J was published last week. In this article you find the naming convention of my sliced pictures and give some tips about saved selections.

I use a naming convention for the separated sliced pictures.
The picture will be sliced in columns A, B, C, D
and rows 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, ..., 99
The final ( .jpg or .png ) pictures will be placed in a table.
A01.jpg B01.jpg C01.jpg D01.jpg
A02.jpg B02.jpg C02.jpg D02.jpg
A03.jpg B03.jpg C03.jpg D03.jpg
A04.jpg B04.jpg C04.jpg D04.jpg


I use 2 digits ( 01 02 03 and NOT 1 2 3 ) to help sorting the files.
Often columns need to be joined. E.g. if you have in the top row left a power button and right a mute button and all other rows have four buttons. In this case you will have


A01B.jpg        C01D.jpg
A02.jpg B02.jpg C02.jpg D02.jpg
A03.jpg B03.jpg C03.jpg D03.jpg
A04.jpg B04.jpg C04.jpg D04.jpg


A01B is A01 and B01 joined
C01B is C01 and D01 joined


I do not like to join rows !!
Sometimes there are remotes with some rows of 4 and some with 3 buttons.
If possible i like to do this by joining column B and C as in the example below.


A01B.jpg        C01D.jpg
A02.jpg B02.jpg C02.jpg D02.jpg
A03.jpg B03.jpg C03.jpg D03.jpg
A04.jpg B04.jpg C04.jpg D04.jpg
A05.jpg B05.jpg C05.jpg D04.jpg
A06.jpg   B06C.jpg      D06.jpg
A07.jpg   B07C.jpg      D07.jpg
A08.jpg   B08C.jpg      D08.jpg
A09.jpg   B09C.jpg      D09.jpg
A10.jpg B10.jpg C10.jpg D10.jpg
A11.jpg B11.jpg C11.jpg D11.jpg
A12.jpg B11.jpg C12.jpg D12.jpg


- In Photoshop you can create saved selections; make a selection and using the menu {Select] [Save Selection].
I make saved selections for all columns ( A, B, C, D ) by selecting the picture from top to bottom and the desired column width using my mouse. With Save and Load selection there are options to  invert , Make new Selection, Add to Selection Subtract from Selection and Intersect with Selection. If needed you can also make saved selections for combinations ( AB, CD, BC ). By saving the selections you can call this selection when needed. Many years ago i used a small dedicated program to slice pictures and create HTML code but next week will explain how i used the saved selections of the columns to slice my pictures.

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"