In this project, we will learn how to control the on board 4Duino LED via I/O port (D13) from web browser. In built ESP8266 Wi-Fi module is configured as server enabling the 4Duino to receive commands from a web browser (client).

How it works

capture

6

Note: This project could be carried out only if the Client and the Server are in the same network because your home router prevents the 4Duino server to be accessed from internet. You can allow access to the 4Duino to the internet by enabling port forwarding. Hence, you can control the LED from anywhere around the world as long as you are connected to the internet.

Components

This projects only utilizes the internal circuitry of the 4Duino. Hence you do not require any components for this project. However, a micro USB cable is required to program the 4Duino.

Implementation

Step1: Build

4Duino has an inbuilt ESP8266 Wi-Fi module. Hence, there is no external circuitry required for this project.

Step2: Program

Workshop 4 – 4Duino Basic Graphics environment is used to program this project. (The same could be implemented in the latest Arduino IDE)

This project requires the Arduino IDE to be installed as Workshop calls the Arduino IDE for compiling the Arduino sketches. The Arduino IDE however is not required to be opened or modified to program the 4Duino.

capture_1

Open the above file using Workshop 4.

Simply change the SSID and the PASSWORD to suit your router, on both the program.

2

Note: Download the code here.

Step3: Compile and Upload

Connect the first 4Duino (Client) to the PC using uUSB cable (similar to Arduino).

Now click on the “Comp’nLoad” button on Program1 (Client).

9

Step 4: GPIO Control from web browser

The 4Duino’s Local IP address is set to “10.0.0.82” by the program. Enter this IP address in the browser url field to obtain the web page from 4Duino.

3

By typing “10.0.0.82/pin=13” in the url field to you can toggle LED connected to D13.

3

You will notice that your 4Duino’s on board LED connected to pin 13 is turned ON.

57

The program also allows you to control Pins D10 and D11 in the similar manner.