Uploaded by Surya Rai

Proteus LED Control via IoTBuilder Code

advertisement
Proteus LED Control via IoTBuilder Code
1 of 16
New
NodeMCU

https://www.ee-diary.com/2022/10/proteus-led-control-via-iotbuilder-co...
Arduino & Microcontrollers
ESP8266
RF Circuits
Electronics


Actuators & Sensors
Internet of Things(IoT)
Programming


Calculators
Web Server

Web App

GSM
741 Op-

Home  IoT  Proteus LED Control via IoTBuilder Code
Proteus LED Control via IoTBuilder Code
Author - ee-diary
 October 06, 2022  3 minute read
Proteus LED Control via IoTBuilder Code
The above video illustrates how to make IoT project using Proteus IoTBuilder from source code. 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 P
and select corresponding compiler. The above video shows 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 her
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.
10/12/2022, 10:57 AM
Proteus LED Control via IoTBuilder Code
2 of 16
https://www.ee-diary.com/2022/10/proteus-led-control-via-iotbuilder-co...
0 Comment
POST A COMMENT
* Please Don't Spam Here. All the Comments are Reviewed by Admin.
Post a Comment (0)
10/12/2022, 10:57 AM
Proteus LED Control via IoTBuilder Code
3 of 16
https://www.ee-diary.com/2022/10/proteus-led-control-via-iotbuilder-co...
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.
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.
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.
10/12/2022, 10:57 AM
Proteus LED Control via IoTBuilder Code
4 of 16
https://www.ee-diary.com/2022/10/proteus-led-control-via-iotbuilder-co...
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.
10/12/2022, 10:57 AM
Proteus LED Control via IoTBuilder Code
5 of 16
https://www.ee-diary.com/2022/10/proteus-led-control-via-iotbuilder-co...
Here we will add a round button IoT control.
Then we add
10/12/2022, 10:57 AM
Proteus LED Control via IoTBuilder Code
6 of 16
https://www.ee-diary.com/2022/10/proteus-led-control-via-iotbuilder-co...
We then click on the main control which will show the main panel that will be displayed on the browse
Then we drag and place the PushButton on the front panel area.
10/12/2022, 10:57 AM
Proteus LED Control via IoTBuilder Code
7 of 16
https://www.ee-diary.com/2022/10/proteus-led-control-via-iotbuilder-co...
Similarly we place the Indicator on the front panel area.
We can then resize the button and the visual LED and edit its properties from the properties panel.
10/12/2022, 10:57 AM
Proteus LED Control via IoTBuilder Code
8 of 16
https://www.ee-diary.com/2022/10/proteus-led-control-via-iotbuilder-co...
Then we add new peripheral which is a virtual LED from the breakout library.
10/12/2022, 10:57 AM
Proteus LED Control via IoTBuilder Code
9 of 16
https://www.ee-diary.com/2022/10/proteus-led-control-via-iotbuilder-co...
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.
10/12/2022, 10:57 AM
Proteus LED Control via IoTBuilder Code
10 of 16
https://www.ee-diary.com/2022/10/proteus-led-control-via-iotbuilder-co...
Then we add the LED peripheral set function into the IoTBtn1_ControlEvent() function as shown.
10/12/2022, 10:57 AM
Proteus LED Control via IoTBuilder Code
11 of 16
https://www.ee-diary.com/2022/10/proteus-led-control-via-iotbuilder-co...
Then we add the getState method and place it into the IoTBtn1_ControlEvent() function after boolean
keyword.
10/12/2022, 10:57 AM
Proteus LED Control via IoTBuilder Code
12 of 16
https://www.ee-diary.com/2022/10/proteus-led-control-via-iotbuilder-co...
We then add the setLamp() method.
10/12/2022, 10:57 AM
Proteus LED Control via IoTBuilder Code
13 of 16
https://www.ee-diary.com/2022/10/proteus-led-control-via-iotbuilder-co...
Then we add the setState method for the virtual LED on the front panel.
10/12/2022, 10:57 AM
Proteus LED Control via IoTBuilder Code
14 of 16
https://www.ee-diary.com/2022/10/proteus-led-control-via-iotbuilder-co...
Next clicking on the main control we edit the property of the push button. The mode is set to toggle.
10/12/2022, 10:57 AM
Proteus LED Control via IoTBuilder Code
15 of 16
https://www.ee-diary.com/2022/10/proteus-led-control-via-iotbuilder-co...
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.
10/12/2022, 10:57 AM
Proteus LED Control via IoTBuilder Code
16 of 16
 Tags

https://www.ee-diary.com/2022/10/proteus-led-control-via-iotbuilder-co...
IoT
Share:






 OLDER
Proteus Visual Designer tutorial - LED Blink

YOU MAY LIKE
Temperature Logger with Proteus IIoT platform
Show more
thank you for your visit, come back soon
Copyright (c) 2022 ee-diary| All Right Reseved
10/12/2022, 10:57 AM
Download