Installing the DHT-11 Temperature Sensor
Additinal information on seting up the DHT-11 temperature sensor is provided in this section. For instructions on setting up your Dev Kit, refer to the Milli Developer Kit v1.0 Getting Started Guide.
The folowing image illustrates how your hardware set-up should look on complete installation and setup of the Milli Developer Kit with the DHT-11 temperature sensor:
Install the 4-Pin DHT11 Sensor Hardware
See image below for a visual reference to the 4-pin DHT-11 temperature sensor with a 10K Ohm pull-up resistor:
To connect the Adafruit DHT11 to your Milli Developer Kit stack:
- Connect the Ground wire to the Milli shield GND.
- Connect the VCC wire to Milli shield 5V.
- Connect the Signal wire to Milli shield Analog Input A4.
Note: In the below image, the blue wire is connected to Digital Pin 7 instead of A4
<<Why?>> - Connect the 10K Ohm pull-up resistor between VCC and Signal
Add Your Own Sensor
For more information on adding more sensors using Sensor API click here.
CoAP Temperature Sensor Resources
Available Resources
The following CoAP resources are made available by Sensor API for the temperature sensor. These resources would be used in conjunction with a CoAP client.
Resources are described by the following:
- A method (GET or PUT)
- A URI to specify the resource name
- A query string
The following CoAP resources are made available by Sensor API for the temperature sensor. These resources would be used in conjunction with a CoAP client.
Resources are described by the following:
- A method (GET or PUT)
- A URI to specify the resource name
- A query
The URI is composed of three parts: /<prefix>/<classifier>/<sensor name> where
- <prefix> is always “snsr”
- <classifier> defaults to “arduino” but can be changed programmatically
- <sensor name> is the name of the sensor, in this case it is “temp”
To set the temperature sensor configuration:
- PUT /snsr/arduino/temp?cfg=C
- PUT /snsr/arduino/temp?cfg=F
To get the temperature sensor configuration:
- GET /snsr/arduino/temp?cfg
To read the temperature sensor:
- GET /snsr/arduino/temp?sens
To request an observe on the temperature sensor:
- GET /snsr/arduino/temp?sens with the CoAP observe option set
Getting Device Time
To get the current network time setting of the device (which is automatically kept by Sensor API) use the following resource:
- GET /snsr/system/time
Dev Kit Diagnostic Port and Terminal Access
The Diagnostic Port can be used to set Developer Kit system variables, to update the Milli NIC firmware, and set other preferences.
To access the Diagnostic Port
- Attach a USB Smart Cable TTL-232R from e.g. FTDI to J14 on the Milli Shield. See image below for more detail.
- Black (GND) connect to innermost pin
- Orange to middle pin
- Yellow to outermost pin
- Connect the Smart Cable to the diagnostic port
- Ensure that the Terminal Emultaor (such as a Tera Term) is:
- Configured with a Baud Rate of 115,200
- Connected to the COM port associated with the Smart Cable
- Reset the Milli Shield by pressing the blue button. A message in the terminal window will appear. See image below.
Milli Developer Kit Firmware Upgrade
Refer to the following pages for directions on upgrading the Mill Dev Kit firmware and how to configure Mill Dev Kit firmware or set firmware sysvars.
CoAP Client Options
Java CoAP Client Application
For a CoAP client that needs to:
- Run on any platform (Windows, Mac OS, Linux)
- Be included as part of a shell script
- Have a finer grained control over CoAP requests or
- Allow for more complex CoAP request patterns
- load and use the Java CoAP Client Application.
This client is command line based and requires command line cptions or request files that direct the clients actions. The Java CoAP Client makes managing Gateway sessions easier for complex CoAP requests patterns.
Windows CoAP Client Application
If you have a Microsoft Windows PC, you can download and install the Windows CoAP Client Application. This tool provides an easy-to-use user interface for communicating with Milli Developer Kit based sensor devices. Follow the instructions to install the client application.
Other Clients
Almost all CoAP Core implementations include sample CoAP clients. Some work better than others. All have limitations and bugs.
CoAP Gateway
Integral to the Itron network is a CoAP proxy that provides user authentication and security support. Please refer to the CoAP Gateway API for details on Gateway specific CoAP resources and Gateway session management. For access to a Milli Developer Kit HDK, all CoAP requests must proxy through the Gateway. Not direct to device CoAP is supported.