Hi,
I like to share my second experience connecting Raspberry Pi , KY008 (Laser transmitter sensor module ) and Node Red.
I.Things Needed :
1. Raspberry Pi 3 Model B+
3. Solderless board
4. 3 Male to Female Jumper wires.
II. Circuit Completion
Complete the circuit has shown below
III. Install necessary packages :
a) Download package : http://www.airspayce.com/mikem/bcm2835/bcm2835-1.48.tar.gz
b) tar zxvf bcm2835-1.48.tar.gz
c) Compile process :
cd bcm2835-1.48
cd bcm2835-1.48
./configure
make
sudo make check
sudo make install
d) After completing the installation of the BCM2835 library, we can install the Node-DHT-Sensor library:
sudo npm install node-dht-sensor
IV. Node Red Flow
a) Start Node Red : sudo node-red-start
b) Drag and drop the nodes as shown below and wire them
c) Configure the nodes as shown below :
Inject node :
Select "String" for Payload and configure the repeat as "interval" as shown below :
Select "String" for Payload and configure the repeat as "interval" as shown below :
rpi-dht22 node :
Node Red Flow :
IV. Executing the Node Red Flow
Click Deploy. You can see the laser sensor blinking.
Now , you have successfully got the blinking light using KY008 Sensor.
Kindly share your comments to improve my posting.
No comments:
Post a Comment