IoT Tutorial Part I : Create a Simple IoT Device that Blinks LED

shaun Big Data Architect and lover of all thing distributed and Scalable.

In this tutorial we will create a IoT device using the Particle Argon Kit.  The Argon is WI-FI enabled development board that can act as a standalone endpoint or part of particle mesh network.  We will be using it as an endpoint.  First you will need to setup your particle device.

Step 1: Setup Your Particle Argon


Follow the link below and follow the steps to setup you account and device.

https://setup.particle.io/

 Is will ask you to do the following.

1. Setup Login
2. Argon/Boron/Xenon
3. Argon
4. Download the particle app(IOS/Android)
5. Pair Argon
6. Update Device 5-10 minutes
7. Connect to WIFI network
8. Name your device
9. Return to setup on Machine

When your are finished return to your console.

https://console.particle.io/

Click on icon for web IDE.

Check to make sure your device is present.  Click on devices button in bottom left corner.

IoT Console

Step 2: Hardware Setup


You will need the following hardware:

Included in Argon kit:

  • Your Particle device
  • USB to micro USB cable
  • Power source for USB cable (such as your computer, USB battery, or power brick)
  • (2) Resistors between 220 Ohms and 1000 Ohms(1)
  • LED, any color
  • (1) Photoresistor or phototransistor (explained below)

Not Included:

  • 3 M-M  breadboard wires(not included in Argon Kit
Particle Argon Kit + M-M wires

First make sure your device is unplugged.

Take note that the Argon IoT device has named connections on the side of it.

 

Plug your Argon device into the top of the breadboard aligning the top most pins with the top row of slots in the breadboard.

Make sure you have at least one column of open slots on the left and right side of the Argon on the bread board.

Use a wire(red in the picture) to connect the 3.3 on the Argon to the right side of the breadboard.

The negative is 4 from the left if you are looking directly at the left side of the breadboard.

Connect the ground(black wire in pic) from the Argon to the negative on the left side of the breadboard.

Connect the D6 from the Argo to the second row from the bottom on the right side of the breadboard.  This will be the connection we use to flash our led. Any of the 5 slots will be fine.


When using an LED, you must always add a current liming resistor.  Connect the 220 ohm liming transistor to the last row on the left of the live wired breadboard.

Next connect the long end of the LED to the second row from the bottom on the breadboard.  The same row that you ran the wire and connected to D6 on the Argon.  Connect the short side of the LED to the bottom row of the breadboard which is the same row that you connected the resistor to.

This completes the circuit.  Plug in your device!  You will only see a power light on the chip and nothing from your LED yet.

Step 3: Flash Your Device


Now we need to give our device its marching orders by flashing some software to the chip.

Go to your IDE Dashboard and click on the code icon and then under example apps click on Blink an LED.

Read through your code to get an idea of what the application does.

Change line 28 in your code to activate D6 where we have our wire connected

int led1 = D6;

Now we need to flash your code to your device.  Click the lightening bolt icon on your IDE dashboard.

Make sure your device is plugged in.  After a short while you should see the device start to flash!

 

Nice work you have connected your first IoT devices.

Tags : Hardware IoT
shaun

Big Data Architect and lover of all thing distributed and Scalable.

Related Posts

IoT Tutorial Part II : Control LED over the Net with Simple API

IoT Tutorial Part II : Control LED over the Net with Simple API

March 24, 2019

In our previous tutorial we connected our Particle Argon device to the internet, wired in an LED light and then flashed some code that makes it blink. Now we are going to going to add some functionality to be able to control it over the internet. Step 1:  Setup your hardware If you have not setup … Continue reading IoT Tutorial Part II : Control LED over the Net with Simple API

Read More
Connecting to Nest Camera API and Getting Live URL

Connecting to Nest Camera API and Getting Live URL

March 8, 2019

I love our smart cameras but I am tired of waiting for rollouts of new features before I can use the camera. I would also like to store images and video automatically to my own cloud storage for later batch analysis with some home grown ML models. In this tutorial I am going to walk … Continue reading Connecting to Nest Camera API and Getting Live URL

Read More