SlideShare a Scribd company logo
1 of 18
How to create Boss-Detector
===========================
**XXXX XXXX**
##How to create Boss-detector
-Objective: Create **Boss-
Detector**, using Pi-2, Bluemix, in
1-hour
-When your boss approaches; you are
notified.
>>>>>>>
##Equipment
-Raspberry Pi-2: US$35
-Bluetooth dongle: US$2
-Wifi dongle: US$5
-8G micro-SD/NOOBS: US$7
-Total: US$49
-(optional) enclosure: US$8
##Pre-requisite
-Linux or mac laptop
-register free trial [Bluemix]
(http://console.ng.bluemix.net)
##Step-0: find out your boss’
bluetooth-enabled phone
1.Approach your boss, along with
Linux or mac laptop
2.Open “Terminal” program
– Run “$hcitool scan”
– Find out his phone’s bluetooth ID, in format of,
e.g. “F8:2F:A8:E2:FE:F5”
– Write it down
##Step-1: setup Pi-2
1.Ground yourself
2.Connect Pi-2: bluetooth, wifi,
keyboard, hdmi display, 5V/2A DC
power supply, Ethernet
3.Install onto enclosure
##Step-2: configure wifi
1.Logon/pw: pi/raspberry
2.Find the correct wifi driver for your
device (..google it)
3.Install steps
– http://elinux.org/RPi_Peripherals#Wireless:_TP-
Link_TL-WN722N_USB_wireless_adapter_.28Debian_6.29
– https://www.raspberrypi.org/forums/viewtopic.php?
t=7592
4.Check
– Run “$ip addr”
– Check wlan0 is UP
– Ensure the wifi working in your office as
well
##Step-3: install bluez
1.Run
– “$sudo apt-get install bluez”
– “$sudo apt-get install python-bluez”
2.Check
– Run “$hcitool dev”
– Check hci0 is running
– Turn on bluetooth of your mobile phone
– Run “$hcitool scan”
– Check your device’s id
Also see: http://www.instructables.com/id/Raspberry-Pi-
Bluetooth-InOut-Board-or-Whos-Hom/
##Step-4: create a program
1.Program
– Go to home directory /home/pi
– Create a program, namely “usebluetooth.py”, with
below code. Adjust sleep(time)
– In the “bluetooth.lookup_name()”, fill in your
bluetooth ID (for testing); or your boss bluetooth
ID (for production)
##Step-5: install Bluemix/NODE-
RED
1.Run
– “$curl –sL https://deb.nodesource.com/setup |sudo
bash -”
– “$sudo apt-get install –y build-essential python-dev
python-rpi.gpio nodejs”
– “node-red-pi –max-old-space-size=128”
2.Check visual editor
– Use browser upon http://your-pi-ip-address:1880/
Also see: http://nodered.org/docs/hardware/raspberrypi.html
##Step-6a: edit NODE-RED
1.Add a dummy input node
- Drop “rpi-gpio” to main pane; double-click it
- Fill as below diagram (pin number is arbitrary)
##Step-6b: edit NODE-RED
1.Add an exec node
– Drop “exec” node to main pane; double click it
– Fill in the program name
##Step-6c: Edit NODE-RED
1.Add switch node
– Drop “switch” node to main pane; double click it
– Fill in the filter criteria “Boss Detected”
##Step-6d: Edit NODE-RED
1.Add twitter node
– Drop “twitter” node to main pane; double click it
– Click the pencil, to add your twitter credential
##Step-6e: Edit NODE-RED
1.Finish it
– Wire them up
– Beware to wire first output hook in “exec”; this
is stdout
– Click “Deploy”, and you will see a pop-up
“successfully saved”
##Step-4: Configure reboot
1.Add to init.d
– There are ways to do it; I pick this one
– Run “$sudo wget -O /tmp/download
https://gist.github.com/bigmonkeyboy/9962293/downloa
d && sudo tar -zxf /tmp/download --strip-components
1 -C /etc/init.d && sudo chmod 755
/etc/init.d/nodered && sudo update-rc.d nodered
defaults”
2.Reboot & Check
– You will see something like “Node-RED Started”,
after reboot
Also See
https://gist.github.com/bigmonkeyboy/9962293
http://nodered.org/docs/getting-started/running.html
##Step-4: Install-Check
1.Pack it in enclosure
2.Install it silently with 5V/2A DC
3.Check your twitter, if your boss
approaches
##Remark
1.The program does not handle repeated
“check-in/out” condition properly. You
may improve yourself.
2.The NODE-RED is installed on Pi2. A
better approach is to register your
device to Bluemix; and send payload to
directly to it, via MQTT, for twitter
processing. (I tried it as well; works
perfectly)
3.Have fun!

More Related Content

Viewers also liked

$500 budget scenario
$500 budget scenario$500 budget scenario
$500 budget scenariojaylee1229
 
GPS Project Presentation
GPS Project PresentationGPS Project Presentation
GPS Project PresentationJoel Heilman
 
Overtraining syndrome pivot health
Overtraining syndrome   pivot healthOvertraining syndrome   pivot health
Overtraining syndrome pivot healthPivothealth
 
Irish Cinema Paper
Irish Cinema PaperIrish Cinema Paper
Irish Cinema PaperJoel Heilman
 
Forum pa call4ideas v2
Forum pa call4ideas v2Forum pa call4ideas v2
Forum pa call4ideas v2maria_fazio
 
Long boat 2014 from chuck
Long boat 2014 from chuckLong boat 2014 from chuck
Long boat 2014 from chuckcndavis
 
D google searching tactics
D google searching tacticsD google searching tactics
D google searching tacticsAniket Sharma
 
Importance of eating fat for athletes
Importance of eating fat for athletesImportance of eating fat for athletes
Importance of eating fat for athletesPivothealth
 
Jonathan Reyes Final PPP
Jonathan Reyes Final PPPJonathan Reyes Final PPP
Jonathan Reyes Final PPPjgreyes1
 

Viewers also liked (12)

$500 budget scenario
$500 budget scenario$500 budget scenario
$500 budget scenario
 
GPS Project Presentation
GPS Project PresentationGPS Project Presentation
GPS Project Presentation
 
Overtraining syndrome pivot health
Overtraining syndrome   pivot healthOvertraining syndrome   pivot health
Overtraining syndrome pivot health
 
Irish Cinema Paper
Irish Cinema PaperIrish Cinema Paper
Irish Cinema Paper
 
Forum pa call4ideas v2
Forum pa call4ideas v2Forum pa call4ideas v2
Forum pa call4ideas v2
 
Long boat 2014 from chuck
Long boat 2014 from chuckLong boat 2014 from chuck
Long boat 2014 from chuck
 
D google searching tactics
D google searching tacticsD google searching tactics
D google searching tactics
 
Importance of eating fat for athletes
Importance of eating fat for athletesImportance of eating fat for athletes
Importance of eating fat for athletes
 
Cv english
Cv englishCv english
Cv english
 
Professional Summary
Professional SummaryProfessional Summary
Professional Summary
 
Jonathan Reyes Final PPP
Jonathan Reyes Final PPPJonathan Reyes Final PPP
Jonathan Reyes Final PPP
 
On Ramp Program
On Ramp ProgramOn Ramp Program
On Ramp Program
 

Similar to How.to.create.boss.detector

manual_2020_Cyber Physical System.pdf
manual_2020_Cyber Physical System.pdfmanual_2020_Cyber Physical System.pdf
manual_2020_Cyber Physical System.pdfssuserc5ee4c
 
Node red with Arduino
Node red with ArduinoNode red with Arduino
Node red with ArduinoAnshu Pandey
 
Introduction to pcDuino
Introduction to pcDuinoIntroduction to pcDuino
Introduction to pcDuinoJingfeng Liu
 
An introduction to workflow-based programming with Node-RED
An introduction to workflow-based programming with Node-REDAn introduction to workflow-based programming with Node-RED
An introduction to workflow-based programming with Node-REDBoris Adryan
 
DEF CON 23 - Phil Polstra - one device to pwn them all
DEF CON 23 - Phil Polstra - one device to pwn them allDEF CON 23 - Phil Polstra - one device to pwn them all
DEF CON 23 - Phil Polstra - one device to pwn them allFelipe Prado
 
Node red for Raspberry Pi
Node red for Raspberry PiNode red for Raspberry Pi
Node red for Raspberry PiAnshu Pandey
 
Build your first android things application
Build your first android things applicationBuild your first android things application
Build your first android things applicationKeval Patel
 
Node-RED and getting started on the Internet of Things
Node-RED and getting started on the Internet of ThingsNode-RED and getting started on the Internet of Things
Node-RED and getting started on the Internet of ThingsBoris Adryan
 
DeviceHub - First steps using Intel Edison
DeviceHub - First steps using Intel EdisonDeviceHub - First steps using Intel Edison
DeviceHub - First steps using Intel EdisonGabriel Arnautu
 
Gitt and Git-flow
Gitt and Git-flowGitt and Git-flow
Gitt and Git-flowMd. Masud
 
Raspberry Pi - Lecture 6 Working on Raspberry Pi
Raspberry Pi - Lecture 6 Working on Raspberry PiRaspberry Pi - Lecture 6 Working on Raspberry Pi
Raspberry Pi - Lecture 6 Working on Raspberry PiMohamed Abdallah
 
IoT Getting Started with Intel® IoT Devkit
IoT Getting Started with Intel® IoT DevkitIoT Getting Started with Intel® IoT Devkit
IoT Getting Started with Intel® IoT DevkitVasily Ryzhonkov
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014biicode
 
Os dev tool box
Os dev tool boxOs dev tool box
Os dev tool boxbpowell29a
 
Generating keyboard in raspberry pi
Generating keyboard in raspberry piGenerating keyboard in raspberry pi
Generating keyboard in raspberry piPrabhanda Prabha
 
Starting Raspberry Pi
Starting Raspberry PiStarting Raspberry Pi
Starting Raspberry PiLloydMoore
 
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startednoahjamessss
 
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedgovendaagoovenda
 

Similar to How.to.create.boss.detector (20)

manual_2020_Cyber Physical System.pdf
manual_2020_Cyber Physical System.pdfmanual_2020_Cyber Physical System.pdf
manual_2020_Cyber Physical System.pdf
 
Node red with Arduino
Node red with ArduinoNode red with Arduino
Node red with Arduino
 
Introduction to pcDuino
Introduction to pcDuinoIntroduction to pcDuino
Introduction to pcDuino
 
An introduction to workflow-based programming with Node-RED
An introduction to workflow-based programming with Node-REDAn introduction to workflow-based programming with Node-RED
An introduction to workflow-based programming with Node-RED
 
DEF CON 23 - Phil Polstra - one device to pwn them all
DEF CON 23 - Phil Polstra - one device to pwn them allDEF CON 23 - Phil Polstra - one device to pwn them all
DEF CON 23 - Phil Polstra - one device to pwn them all
 
Node red for Raspberry Pi
Node red for Raspberry PiNode red for Raspberry Pi
Node red for Raspberry Pi
 
Build your first android things application
Build your first android things applicationBuild your first android things application
Build your first android things application
 
Node-RED and getting started on the Internet of Things
Node-RED and getting started on the Internet of ThingsNode-RED and getting started on the Internet of Things
Node-RED and getting started on the Internet of Things
 
DeviceHub - First steps using Intel Edison
DeviceHub - First steps using Intel EdisonDeviceHub - First steps using Intel Edison
DeviceHub - First steps using Intel Edison
 
Gitt and Git-flow
Gitt and Git-flowGitt and Git-flow
Gitt and Git-flow
 
Raspberry Pi - Lecture 6 Working on Raspberry Pi
Raspberry Pi - Lecture 6 Working on Raspberry PiRaspberry Pi - Lecture 6 Working on Raspberry Pi
Raspberry Pi - Lecture 6 Working on Raspberry Pi
 
IoT Getting Started with Intel® IoT Devkit
IoT Getting Started with Intel® IoT DevkitIoT Getting Started with Intel® IoT Devkit
IoT Getting Started with Intel® IoT Devkit
 
LIGGGHTS installation-guide
LIGGGHTS installation-guideLIGGGHTS installation-guide
LIGGGHTS installation-guide
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
Os dev tool box
Os dev tool boxOs dev tool box
Os dev tool box
 
Lab manual
Lab manualLab manual
Lab manual
 
Generating keyboard in raspberry pi
Generating keyboard in raspberry piGenerating keyboard in raspberry pi
Generating keyboard in raspberry pi
 
Starting Raspberry Pi
Starting Raspberry PiStarting Raspberry Pi
Starting Raspberry Pi
 
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-started
 
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-started
 

More from Ross Tang

Class.devops.chapter.3.hybrid
Class.devops.chapter.3.hybridClass.devops.chapter.3.hybrid
Class.devops.chapter.3.hybridRoss Tang
 
Class.mobilefirstfoundation.chapter.2.devops
Class.mobilefirstfoundation.chapter.2.devopsClass.mobilefirstfoundation.chapter.2.devops
Class.mobilefirstfoundation.chapter.2.devopsRoss Tang
 
Class.bluemix.mbaas.chapter.2.pattern
Class.bluemix.mbaas.chapter.2.patternClass.bluemix.mbaas.chapter.2.pattern
Class.bluemix.mbaas.chapter.2.patternRoss Tang
 
Class.mobile-first strategy
Class.mobile-first strategyClass.mobile-first strategy
Class.mobile-first strategyRoss Tang
 
Class.bluemix.presence.insights
Class.bluemix.presence.insightsClass.bluemix.presence.insights
Class.bluemix.presence.insightsRoss Tang
 
Class.devops.chapter.2.ucd
Class.devops.chapter.2.ucdClass.devops.chapter.2.ucd
Class.devops.chapter.2.ucdRoss Tang
 
Class.bluemix.dbaas
Class.bluemix.dbaasClass.bluemix.dbaas
Class.bluemix.dbaasRoss Tang
 
Class.mobilefirstfoundation.chapter.1.intro
Class.mobilefirstfoundation.chapter.1.introClass.mobilefirstfoundation.chapter.1.intro
Class.mobilefirstfoundation.chapter.1.introRoss Tang
 
Class.devops.chapter.1.intro
Class.devops.chapter.1.introClass.devops.chapter.1.intro
Class.devops.chapter.1.introRoss Tang
 
Class.bluemix.mbaas.chapter.1
Class.bluemix.mbaas.chapter.1Class.bluemix.mbaas.chapter.1
Class.bluemix.mbaas.chapter.1Ross Tang
 
Class.aspera.chapter.1.intro
Class.aspera.chapter.1.introClass.aspera.chapter.1.intro
Class.aspera.chapter.1.introRoss Tang
 
Class.bluemix.overall.chapter.1.intro
Class.bluemix.overall.chapter.1.introClass.bluemix.overall.chapter.1.intro
Class.bluemix.overall.chapter.1.introRoss Tang
 

More from Ross Tang (12)

Class.devops.chapter.3.hybrid
Class.devops.chapter.3.hybridClass.devops.chapter.3.hybrid
Class.devops.chapter.3.hybrid
 
Class.mobilefirstfoundation.chapter.2.devops
Class.mobilefirstfoundation.chapter.2.devopsClass.mobilefirstfoundation.chapter.2.devops
Class.mobilefirstfoundation.chapter.2.devops
 
Class.bluemix.mbaas.chapter.2.pattern
Class.bluemix.mbaas.chapter.2.patternClass.bluemix.mbaas.chapter.2.pattern
Class.bluemix.mbaas.chapter.2.pattern
 
Class.mobile-first strategy
Class.mobile-first strategyClass.mobile-first strategy
Class.mobile-first strategy
 
Class.bluemix.presence.insights
Class.bluemix.presence.insightsClass.bluemix.presence.insights
Class.bluemix.presence.insights
 
Class.devops.chapter.2.ucd
Class.devops.chapter.2.ucdClass.devops.chapter.2.ucd
Class.devops.chapter.2.ucd
 
Class.bluemix.dbaas
Class.bluemix.dbaasClass.bluemix.dbaas
Class.bluemix.dbaas
 
Class.mobilefirstfoundation.chapter.1.intro
Class.mobilefirstfoundation.chapter.1.introClass.mobilefirstfoundation.chapter.1.intro
Class.mobilefirstfoundation.chapter.1.intro
 
Class.devops.chapter.1.intro
Class.devops.chapter.1.introClass.devops.chapter.1.intro
Class.devops.chapter.1.intro
 
Class.bluemix.mbaas.chapter.1
Class.bluemix.mbaas.chapter.1Class.bluemix.mbaas.chapter.1
Class.bluemix.mbaas.chapter.1
 
Class.aspera.chapter.1.intro
Class.aspera.chapter.1.introClass.aspera.chapter.1.intro
Class.aspera.chapter.1.intro
 
Class.bluemix.overall.chapter.1.intro
Class.bluemix.overall.chapter.1.introClass.bluemix.overall.chapter.1.intro
Class.bluemix.overall.chapter.1.intro
 

Recently uploaded

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceIES VE
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingWSO2
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringWSO2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 

Recently uploaded (20)

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 

How.to.create.boss.detector

  • 1. How to create Boss-Detector =========================== **XXXX XXXX**
  • 2. ##How to create Boss-detector -Objective: Create **Boss- Detector**, using Pi-2, Bluemix, in 1-hour -When your boss approaches; you are notified. >>>>>>>
  • 3. ##Equipment -Raspberry Pi-2: US$35 -Bluetooth dongle: US$2 -Wifi dongle: US$5 -8G micro-SD/NOOBS: US$7 -Total: US$49 -(optional) enclosure: US$8
  • 4. ##Pre-requisite -Linux or mac laptop -register free trial [Bluemix] (http://console.ng.bluemix.net)
  • 5. ##Step-0: find out your boss’ bluetooth-enabled phone 1.Approach your boss, along with Linux or mac laptop 2.Open “Terminal” program – Run “$hcitool scan” – Find out his phone’s bluetooth ID, in format of, e.g. “F8:2F:A8:E2:FE:F5” – Write it down
  • 6. ##Step-1: setup Pi-2 1.Ground yourself 2.Connect Pi-2: bluetooth, wifi, keyboard, hdmi display, 5V/2A DC power supply, Ethernet 3.Install onto enclosure
  • 7. ##Step-2: configure wifi 1.Logon/pw: pi/raspberry 2.Find the correct wifi driver for your device (..google it) 3.Install steps – http://elinux.org/RPi_Peripherals#Wireless:_TP- Link_TL-WN722N_USB_wireless_adapter_.28Debian_6.29 – https://www.raspberrypi.org/forums/viewtopic.php? t=7592 4.Check – Run “$ip addr” – Check wlan0 is UP – Ensure the wifi working in your office as well
  • 8. ##Step-3: install bluez 1.Run – “$sudo apt-get install bluez” – “$sudo apt-get install python-bluez” 2.Check – Run “$hcitool dev” – Check hci0 is running – Turn on bluetooth of your mobile phone – Run “$hcitool scan” – Check your device’s id Also see: http://www.instructables.com/id/Raspberry-Pi- Bluetooth-InOut-Board-or-Whos-Hom/
  • 9. ##Step-4: create a program 1.Program – Go to home directory /home/pi – Create a program, namely “usebluetooth.py”, with below code. Adjust sleep(time) – In the “bluetooth.lookup_name()”, fill in your bluetooth ID (for testing); or your boss bluetooth ID (for production)
  • 10. ##Step-5: install Bluemix/NODE- RED 1.Run – “$curl –sL https://deb.nodesource.com/setup |sudo bash -” – “$sudo apt-get install –y build-essential python-dev python-rpi.gpio nodejs” – “node-red-pi –max-old-space-size=128” 2.Check visual editor – Use browser upon http://your-pi-ip-address:1880/ Also see: http://nodered.org/docs/hardware/raspberrypi.html
  • 11. ##Step-6a: edit NODE-RED 1.Add a dummy input node - Drop “rpi-gpio” to main pane; double-click it - Fill as below diagram (pin number is arbitrary)
  • 12. ##Step-6b: edit NODE-RED 1.Add an exec node – Drop “exec” node to main pane; double click it – Fill in the program name
  • 13. ##Step-6c: Edit NODE-RED 1.Add switch node – Drop “switch” node to main pane; double click it – Fill in the filter criteria “Boss Detected”
  • 14. ##Step-6d: Edit NODE-RED 1.Add twitter node – Drop “twitter” node to main pane; double click it – Click the pencil, to add your twitter credential
  • 15. ##Step-6e: Edit NODE-RED 1.Finish it – Wire them up – Beware to wire first output hook in “exec”; this is stdout – Click “Deploy”, and you will see a pop-up “successfully saved”
  • 16. ##Step-4: Configure reboot 1.Add to init.d – There are ways to do it; I pick this one – Run “$sudo wget -O /tmp/download https://gist.github.com/bigmonkeyboy/9962293/downloa d && sudo tar -zxf /tmp/download --strip-components 1 -C /etc/init.d && sudo chmod 755 /etc/init.d/nodered && sudo update-rc.d nodered defaults” 2.Reboot & Check – You will see something like “Node-RED Started”, after reboot Also See https://gist.github.com/bigmonkeyboy/9962293 http://nodered.org/docs/getting-started/running.html
  • 17. ##Step-4: Install-Check 1.Pack it in enclosure 2.Install it silently with 5V/2A DC 3.Check your twitter, if your boss approaches
  • 18. ##Remark 1.The program does not handle repeated “check-in/out” condition properly. You may improve yourself. 2.The NODE-RED is installed on Pi2. A better approach is to register your device to Bluemix; and send payload to directly to it, via MQTT, for twitter processing. (I tried it as well; works perfectly) 3.Have fun!