Control LED Blinking Using Java in Azure IoT Hub

0 votes

I want to be able to control LED bulbs using Azure IoT.Help with one sample example for turning LED on/off using java and Azure IOT.

Sep 5, 2018 in IoT (Internet of Things) by Matt
• 2,260 points
162 views

1 answer to this question.

0 votes

Your description of what you did is not clear, and your question is too broad for SO. Based on my understanding for your description, I can only give some idea for you.

  1. To turn LED on/off, you need a micro board as a controller, such as Arduino or Raspberry Pi, to receive the switching signal to control a relay which connect LED with Power Supply, or directly to switch the 3.3V/5V port of the board which connect LED if the LED is enough small.

  2. For micro board device with Azure IoT Hub as below.

    • Using Arduino in C/C++ to send device-to-cloud message as heartbeat to Azure IoT Hub for keeping connection & online status, then be ready for receving cloud-to-device message as switching signal from Azure IoT Hub to do the action for switching LED.
    • Using Respberry Pi in Java with Oracle JDK for Linux ARM) or in C# on Windows IoT Core to do the same operations like Arduino above.
  3. Using Java to build a application for User Interface to communicate with Azure IoT Hub to send cloud-to-device messages and check these device status.

There are some sample which you can refer to, but not for Java.

  1. Change the on and off behavior of the LED on Arduino.
  2. Connect your Raspberry Pi 3 device to your IoT hub using C and Node.js
  3. Connect your Intel Edison device to your IoT hub using Node.js and C

Hope it helps. Any concern, please feel free to let me know if you can improve your description.

answered Sep 5, 2018 by anonymous2
• 4,260 points

Related Questions In IoT (Internet of Things)

0 votes
1 answer

Create Azure IoT using ARM Template in Azure

It is not recommended to deploy the ...READ MORE

answered Sep 5, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
195 views
0 votes
1 answer

Certificate issue in Azure IoT Hub

I've fixed this problem: The configured CA certificate ...READ MORE

answered Oct 11, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
610 views
0 votes
1 answer

TCP in Azure IoT Hub

The default Protocol Gateway samples are indeed ...READ MORE

answered Oct 11, 2018 in IoT (Internet of Things) by DataKing99
• 8,130 points
538 views
0 votes
1 answer
0 votes
1 answer

Displaying Table Schema using Power BI with Azure IoT Hub

Answering your first question, Event Hubs are ...READ MORE

answered Aug 1, 2018 in IoT (Internet of Things) by nirvana
• 3,060 points
108 views
0 votes
1 answer

How to use the data I receive from Azure IoT Hub?

The payload you receive will be a ...READ MORE

answered Aug 1, 2018 in IoT (Internet of Things) by DataKing99
• 8,130 points
646 views
0 votes
1 answer

Azure - What service to use for Arduino data (iot)

That's because the two services do completely ...READ MORE

answered Aug 1, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
117 views
0 votes
2 answers

Azure IoT Hub Operations Monitoring

Hi, Can you tell which device you ...READ MORE

answered Jan 4 in IoT (Internet of Things) by Varul
• 140 points
205 views
0 votes
1 answer
0 votes
1 answer

Publishing commands to device in IBM IoT using MQTT in Java

If you are publishing from an application, ...READ MORE

answered Jul 27, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
458 views