Make a IoT Command Center






IoT command center is a great weekend project to undertake, which you can use every morning before you head out to work/school. The IoT command center use the Particle Photon and recipes on https://ifttt.com/ to display data on a screen as shown in the pictures above.
Here are the features that are implement as demoed in Video below
- Display the High and Low temperature for the day
- The weather condition , so you can decide what wear before heading out to work/school.
- Display the inside temperature an humidity using temperature and humidity sensor
- Show latest tweet that you have been mentioned in
- Display your favorite teams score on the screen
- Sending a message from a HTML web page
- And also add NeoPixels to give you an visual indicator when you are sitting far away from the IoT command center
Electronic Componets You'll Need



Here is the list of electronic components you will need to complete the build
- Particle Photon(https://www.sparkfun.com/products/13774)
- Potentiometer - 10 K(https://www.sparkfun.com/products/9939)
- Breadboard (https://www.sparkfun.com/products/9567)
- DHT11 sensor (to measure Temperature and Humidity)(https://www.adafruit.com/products/386)- this comes with the 4.7K resistor
- Adafuit's Monochrome OLED Display (https://www.adafruit.com/products/938)
- Breadboarding wire
- Knob for the Potentiometer (https://www.adafruit.com/products/2046)
In addition you will need the following tools
- Soldering Iron to solder breadboarding wire to the POT
- Solder
- Hot glue run , to secure the 3D printed parts
3D Print BreadBoard Holder



Download the STL files attached and using 3D printing software slice and 3D print the files.If you don't have a 3D printer handy you can use one at your local maker club or library or use a 3D printing service like 3D hubs.
In my case, I printed the BreadboardEncolusre.stl file using the FlashForge Creator Pro and 1.75 mm Sky blue PLA to print.
In addition for slicing I am using Slic3r with the layer height set to
- 0.3mm
- fill density to 15 %.
- temperature -205 C
Printing the file will take about an 1 Hour 40 mins to 2 hours , this depends on your printer settings.
Note: If you plan to NeoPixels to give you the awesome effect as shown in the introduction of the instructable ,download the STL file for the Breadholder from step below , which has cut outs for the Neopixels
Downloads
Putting the Circuit Together



Here are the connection for electronic components to the Particle- Photon
- DHT11 sensor to D5
- Potentiometer to A0
- And the OLED screen in the SPI, that is
- MOSI(Data pin on the OLED) to D0 on the Photon
- CLK to D1
- DC D2
- CS D3
- RESET D4
-GND to GND
- and Vin to 3.3V
Use breadboarding wire so that you can bend it easily, so that I fits comfortably fits in the 3D printed enclosure as shown in the picture above
Note: If you plan to NeoPixels to give you the awesome effect ,build the circuit above and jump to step
Choose Your Enclosure Lid to Print



Choose your design and download the STL file attached, I have two designs one with the Instructable logo and one simple option where you can add a sticker or paint something at the top left conner.
In my case, I printed the STL file using the FlashForge Creator Pro and 1.75 mm Wanhao Light blue PLA to print.
In addition for slicing I am using Slic3r with the layer height set to
- 0.2mm
- fill density to 45 %.
- temperature -205 C
Printing the file will take about an 30 to 40 mins.
If you oil based paint markers handy you can paint the letters as shown in the pictures above.
Preparing Pratice Photon - Running a Basic Test



Before you get to the code you will need to setup up your brand new photon,refer to the photon documentation at
https://docs.particle.io/guide/getting-started/int...
Download the code attached and upload it your the photon , here I had some issues using the Web IDE with the OLED display .h file,so give it a try if it works for you or use Particle Dev which is based on the Atom editor, for more details
https://atom.io/packages/particle-offline-compile...
One you have every thing setup and you are logged in using your particle id , select your Photon and use the flash button to upload the code to the photon as shown in the picture(I named my Photon Home Monitor)
Here we are going to test the setup of your Photon using a simple blink sketch to check if the D7 Led on the photon
Downloads
Uploading the Code



Once you have confirmed that your blink sketch is working and you see D7 Led blink.
Download the Zip file attached and add it to particle folder that you created.
In the Atom editor choose the File -> Add Project folder and select MultiFunctionalStation folder
Un-Comment the spark functions that you would like to use, here at the time of writing this instructable you are only allowed 4 spark functions, which means you can have only 4 IFTTT recipes setup corresponding to each of the spark functions as shown in the second screenshot above
Upload the code using the flash button
You may also want to uncomment the section just below loop() to print the pot values to the screen, this will help to decide values of the Pot for each corresponding spark function.
Downloads
Creating/using IFTTT Recipies



Now to create an account on https://ifttt.com if you dont have one, and then modify the IFTTT Recipes
If you plan on using the same code, update the public recipes under my profile on IFTTT website or create your own https://ifttt.com/p/carmelito/shared
Here you will also need to provide your user credentials for Particle that you register your Photon with, this are the same use credentials you all used in the Atom editor.
In addition you will have to also associate the spark functions with the IFTTT recipe in the then part , as shown in the picture above. (if you dont see the spark function , this means that you have not flashed the Photon with the code in the previous step.)
For more info on IFTTT recipes and the Photon refer to
https://docs.particle.io/guide/tools-and-features/...
Adding NeoPixels




Now if you want to add NeoPixels(https://www.adafruit.com/products/1260) to your build , start by 3D printing the Breadboard base STL file attached in you favorite color filament.Here are the suggested slicer setting for 3D printing the base.
- 0.3 mm
- fill density to 15 %
- temperature -205 C depends on the filament you are going to use.
In addition, you will also have to 3D print the NeoPixel base holders in Transparent PLA , in my case I am using Hatchbox Transparent PLA , and here are the suggested slicer setting
- 0.2mm
- fill density to 30 %
- temperature -200 C
Once done Solder the 4 NeoPixels together as shown in the picture above, here make a note of the data In and data out arrows.
Now hot glue 4 transparent 3D printed parts as shown in picture above and then hot glue the NeoPixels to them.
To read more about NeoPixels refer to the guide at https://learn.adafruit.com/adafruit-neopixel-uberg...
Uploading Code and Putting It All Together







Before you slide the Breadboard in the base and apply the Lid, connect the NeoPixel to pin A5 on the Particle photon and move the potentiometer all the way to the right.
In addition connect the +ve to the 3.3V rail and the ground to the GND.
Now slide the board into the base 3D printed part and attach the Lid and then add the Potentiometer dial.
Download the zip file attached and use the Atom editor to flash the Particle Photon as shown in the second picture above.
Add the potentiometer to lid and then add the knob. And the hot glue to the lid and snap it to the base..
You can now power the Photon using a USB Android/iPhone wall adapter .
Downloads
3D Printing Stand (Optional)




This is an optional step, download the STL file attached and add it to your 3D printing slicer software twice and 3D print the stands.
For slicing I am using Slic3r with the
- layer height set to0.3mm
- infill density to 15 %.
- temperature -205 C
Printing the file will take about an 30 to 40 mins.
Downloads
Sending Message From an HTML Web Page



To send a message from a web page modify the code by uncommenting out the spark function called, MessageMom as shown in the picture above.
Once done download the HTML file attached and update the file with your
- Access Token of your Photon
- and Device Id
You will find both these values at https://build.particle.io/build/ in the settings section and device section respectively.
Once done save the file , enter the message and hit the send button , this will show the message from the web page on the OLED display and cycle through various colors on the Neopixels, which acts as a visual indication that you have a message waiting for you to be checked out !