Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Optoma IFP5 series file. #671

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 113 additions & 0 deletions get_started/Optoma-IFP5-Series.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
---
platform: android
device: Optoma IFP 5 Series
language: java
---

Run a simple JAVA sample on Optoma IFP 5 Series running Android
===
---

# Table of Contents

- [Introduction](#Introduction)
- [Step 1: Prerequisites](#Prerequisites)
- [Step 2: Prepare your Device](#PrepareDevice)
- [Step 3: Build and Run the Sample](#Build)
- [Next Steps](#NextSteps)

<a name="Introduction"></a>
# Introduction

**About this document**

This document describes how to connect Optoma IFP 5 Series with Azure IoT SDK. This multi-step process includes:

- Configuring Azure IoT Hub
- Registering your IoT device
- Build and deploy Azure IoT SDK on device

<a name="Prerequisites"></a>

# Step 1: Prerequisites

You should have the following items ready before beginning the process:

- Connect the device to internet.
- Download and install latest JDK from [here](http://www.oracle.com/technetwork/java/javase/downloads/index.html).
- Download [Android Studio](https://developer.android.com/studio/index.html) on your Windows machine and follow the installation instructions.
- Computer with Git client installed and access to the [azure-iot-sdk-java](https://github.com/Azure/azure-iot-sdk-java) GitHub public repository.
- [Setup your IoT hub][lnk-setup-iot-hub]
- [Provision your device and get its credentials][lnk-manage-iot-hub]

<a name="PrepareDevice"></a>
# Step 2: Prepare your Device

- Make sure desktop is ready as per instructions given in [Prepare your development environment](#Setup_DevEnv).

- Plug in your device to your development machine with a USB cable. If you're developing on Windows, you might need to install the appropriate USB driver for your device. For help installing drivers, see the [OEM USB Drivers](https://developer.android.com/studio/run/oem-usb.html) document.

- Connect the device to internet.

- On host PC, run adb shell and execute following commands:

./adb devices
./adb shell

- Turn on Wifi and configure to connect to internet (commands to configure wifi to connect to internet automatically...)

<a name="Build"></a>
# Step 3: Build and Run the sample

## 3.1 Modify and Build the Samples

1. Start a new instance of Android Studio and open Android project from
[here](https://github.com/ssbomb/Azure-IoT-Client).


2. Go to MainActivity.java, replace the [device connection string] placeholder with connection string of the device you have created in Provision your device and get its credentials and save the file. An example of IoT Hub Connection String is as below:

String deviceconnectionString = "HostName=[YourIoTHubName];SharedAccessKeyName=[YourAccessKeyName];SharedAccessKey=[YourAccessKey]";


3. Build your project by going to ***Build menu > Make Project***.

## 3.2 Run and Validate the Samples

In this section you will run the Azure IoT client SDK samples to validate communication between your device and Azure IoT Hub. You will send messages to the Azure IoT Hub service and validate that IoT Hub has successfully receive the data. You will also monitor any messages sent from the Azure IoT Hub to client.

### 3.2.1 Run the Sample:

- Select one of your project's files and click Run from the toolbar.
- In the Choose Device window that appears, select the Choose a running device radio button, select your device, and click OK.
- Android Studio will install the app on your connected device and starts it.

### 3.2.2 Send Device Message to IoT Hub

- See [Manage IoT Hub](https://github.com/Azure/azure-iot-device-ecosystem/blob/master/manage_iot_hub.md) to learn how to observe the messages IoT Hub receives from the application.
- Run Device explorer on your Development platform.
- Set your IoT Hub Connection String on Configuration tab. Then select Data tab.
- Select Device ID on your device, click Monitor button to start receive event hub data.
- As soon as you run the app on your device (or emulator). Click SEND MESSAGE on app of test device.
- Check Data Monitor window in Device explorer. Verify Receiving events message on Event Hub Data.

<a name="NextSteps"></a>
# Next Steps

You have now learned how to run a sample application that collects sensor data and sends it to your IoT hub. To explore how to store, analyze and visualize the data from this application in Azure using a variety of different services, please click on the following lessons:

- [Manage cloud device messaging with iothub-explorer]
- [Save IoT Hub messages to Azure data storage]
- [Use Power BI to visualize real-time sensor data from Azure IoT Hub]
- [Use Azure Web Apps to visualize real-time sensor data from Azure IoT Hub]
- [Weather forecast using the sensor data from your IoT hub in Azure Machine Learning]
- [Remote monitoring and notifications with Logic Apps]

[Manage cloud device messaging with iothub-explorer]: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-explorer-cloud-device-messaging
[Save IoT Hub messages to Azure data storage]: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-store-data-in-azure-table-storage
[Use Power BI to visualize real-time sensor data from Azure IoT Hub]: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-live-data-visualization-in-power-bi
[Use Azure Web Apps to visualize real-time sensor data from Azure IoT Hub]: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-live-data-visualization-in-web-apps
[Weather forecast using the sensor data from your IoT hub in Azure Machine Learning]: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-weather-forecast-machine-learning
[Remote monitoring and notifications with Logic Apps]: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-monitoring-notifications-with-azure-logic-apps
[lnk-setup-iot-hub]: ../setup_iothub.md
[lnk-manage-iot-hub]: ../manage_iot_hub.md