Proteus LED Control via IoTBuilder Code

In this tutorial, we will be showing you how to control an LED using IoTBuilder and Proteus. IoTBuilder is a powerful tool that allows you to create Internet of Things (IoT) applications with ease. Proteus is a software that simulates electronic circuits and is commonly used for circuit design and testing. Together, IoTBuilder and Proteus make it easy to control an LED over the internet. By the end of this tutorial, you will have a basic understanding of how to control an LED using IoTBuilder and Proteus and will be able to create your own IoT projects. We will be starting with a brief introduction to IoTBuilder and Proteus, followed by a step-by-step guide on how to set up the hardware and software. We will then walk you through the code, explaining how it controls the LED. We will also include troubleshooting tips and suggestions for further experimentation. This tutorial is aimed at beginners but is also suitable for those who already have some experience with IoTBuilder and Proteus and want to learn more about controlling an LED.

IoT Builder Project in Proteus

To create a new IoT project from source code you start with a new project, provide some name for the project and the folder where you want to save the project.

IoT project from source code

Next you should choose Create Firmware Project, setup the controller to Arduino Yun and Arduino AVR as the compiler. You should also check mark the Create Quick Start Files and Create Peripherals.

IoT project from source code

After you have created a firmware project, you should have Arduino Yun placed on the schematic and Source Code with default codes.

The default Server port is 8080 so that when the IoT application is launched then it will be available at the address http://localhost:8080. But if you wish to use another port then you need to edit the port address from the AR9331 schematic part as shown below.

IoT project from source code 3

We then add IoT Control(for front panel) and add peripheral(virtual hardware to the schematic). Right clicking on the project tree we can add new IoT control. 

IoT project from source code
 

Here we will add a round button IoT control.

IoT project from source code

Then we add 

IoT project from source code 3

We then click on the main control which will show the main panel that will be displayed on the browser.

IoT project from source code 3

Then we drag and place the PushButton on the front panel area.

IoT project from source code

Similarly we place the Indicator on the front panel area.

IoT project from source code

We can then resize the button and the visual LED and edit its properties from the properties panel.

IoT Builder

Then we add new peripheral which is a virtual LED from the breakout library.


The LED will be added on the schematic editor as shown below.


In the source code we then drag the PushButton into the source code editor after the loop() function.


Then we add the LED peripheral set function into the IoTBtn1_ControlEvent() function as shown.

Then we add the getState method and place it into the IoTBtn1_ControlEvent() function after boolean keyword.

We then add the setLamp() method.

Then we add the setState method for the virtual LED on the front panel.

Next clicking on the main control we edit the property of the push button. The mode is set to toggle.


We then build the project.

Finally we run the simulation and we can see that when the push button is pressed the LED on the schematic and the LED on the front panel are turned on as illustrated below.

Video Demonstration

In addition to the written tutorial, we also have a video demonstration of LED control using Proteus IoTBuilder from source code. The video provides a visual representation of the hardware and software setup, as well as a step-by-step demonstration of how the code controls the LED.

The video starts with a brief introduction to IoTBuilder and Proteus, followed by a detailed explanation of the hardware setup. We show you how to connect the LED and the required components to the IoTBuilder board, and also explain how the circuit works.

Next, we show you how to set up the software, including how to install and configure IoTBuilder and Proteus. We then provide a step-by-step explanation of the code, highlighting how it controls the LED.

Finally, we demonstrate how to test the project to ensure it's working correctly, and provide troubleshooting tips in case you encounter any issues.

The video is designed to supplement the written tutorial and provide a visual aid for those who prefer to learn through video. It is available on our website and can be accessed by following the link provided in the tutorial.

 

About Proteus IoT builder

There are several ways to start a new IoT project in Proteus. One can create new IoT project with new flowchart as illustrated in the previous tutorial Proteus Visual Designer tutorial - LED Blink or one can start with new Project and choose supported IoT microcontroller board like Arduino Yun or Raspberry Pi and select corresponding compiler. The tutorial here showed a simple IoT project where a LED is turn on or off from browser on localhost IP via WiFi connection. Though internet of things project illustrated here is just a simple LED on/off project one can simple connect a DC motor or bulb lamp and any other binary device instead of the LED. Similarly although shown in the video the LED switch appears on the local IP address 127.0.0.1:8000 we can use another other IP address or custom domain name. For example if you want to host your IoT application on home server read the tutorial How to host website from home to learn how you can do that. If you want to display the IoT application on custom domain name see the tutorial Deploy Arduino Red Node App on Web with Cloudflare Tunnel.

Tutorial Summary

 The tutorial here was about controlling an LED using IoTBuilder and Proteus. IoTBuilder is a powerful tool that allows creating Internet of Things (IoT) applications and Proteus is a software that simulates electronic circuits. The tutorial starts with an introduction to IoTBuilder and Proteus, followed by a step-by-step guide on how to set up the hardware and software. The tutorial then walks the reader through the code, explaining how it controls the LED, it also includes troubleshooting tips and suggestions for further experimentation. The tutorial also includes a video demonstration of LED control with IoTBuilder and Proteus. The video provides a visual representation of the hardware and software setup, as well as a step-by-step demonstration of how the code controls the LED. The tutorial is aimed at beginners but is also suitable for those who already have some experience with IoTBuilder and Proteus and want to learn more about controlling an LED.

Recommendations

If you're interested in learning more about IoTBuilder and Proteus, here are some similar tutorials that you may find helpful:

Post a Comment

Previous Post Next Post