Wednesday, July 20, 2016

Presenter / Laser pointer IOT DIY (2)

This blog article describes how i hardware configured my laser pointer / presenter.

PCB board connections (top down component side) are
-  DHT11
-  Buzzer
Button1  (down)      
Button1  (up)  [not connected]
Button2         [not connected yet]
Button3         [not connected yet]
Reed    ( Button4 )
Shake   (Button5)

' The "other side" of the Button1-5 connected to GND with DIP Switches (A) (1).
'  DIP switches all can be connected to GND (1) or (and!!!) VCC (2)

' To save power consumption DHT11 power can be switched off with DIP switches (B)
'  switch (1) VCC and (2) GND

There is one black (GND) female dupont cable that needs to be connected to GND of the ESP module
There are two red VCC female dupont cables one needs to be connected to VCC on the ESP8266 board.

The laser module needs to be connected to the other red VCC female dupont cable.

The other side of the  laser module is directly connected to the ESP8266 module. I used KY-nnn laser modules (  37in1 arduino module kit ) . As some of these modules are wired reverse you need to check yourself if you need to connect S to VCC or to a GPIO  line of the ESP8266.
The ESP8266 module has the following connections.

'  (left)
' -

' Pin ADC is (currently) connected to Light Detecting Resistor

' -

' Pin Button1 16 GPIO16
let PinButton1 = 16

' Pin... 14 GPIO14

' Pin... 12 GPIO12 / RGB

' Pin... 13 GPIO13 / RGB

' VCC (Red)

' (right)
' PinLaser    5 GPIO4
let PinLaser = 5

' PinDHT11    4  GPIO5
PinDHT11 = 4

' Pin Reed / Button4 0 GPIO0
let PinReed = 0

' Pin Shake / Button5 2 GPIO2
let PinShake = 2

' PinBuzzer  15  GPIO15   /  RGB Red
let PinBuzzer = 15

' GND (Black)

I the programming examples i will try to use the same name for the devices and pins. ( PinButton1 , PinDHT11 ... )


No comments: