Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
2,008 Views

Controlling Galileo GPIO through a button in webpage (Ethernet connection)

Hi,

We are doing a project in which we have to control GPIO of Galileo through a button in webpage using Ethernet for establishing connection. If we press any button in the webpage that data should be sent to Galileo Gen 1 Board.We are using Arduino IDE. If anyone has any valuable inputs on how to do this, please share with us. Requesting you to please share the code also if you have.

Regards,

Akhil

8 Replies
Highlighted
Honored Contributor I
6 Views

Hi Akhil,

Did you already do any thing in Galileo? Do you have your Galileo and corresponding Arduino IDE installed and working properly?

Fernando.

0 Kudos
Highlighted
Novice
6 Views

yea.. Arduino IDE and Galileo works properly. And we used to run some example codes given along with IDE.

Highlighted
Honored Contributor I
6 Views

Then you could start from the WebServer example and adapt it to your needs.

The good news is that you do not need any extra hardware for Ethernet interconnection, the Galileo has all you need for that.

Fernando.

0 Kudos
Highlighted
Novice
6 Views

But using what code we can read the value from browser and send to Galileo board??? If you can can you please explain the coding part

0 Kudos
Highlighted
Honored Contributor I
6 Views

AkhilVijayakumar wrote:

But using what code we can read the value from browser and send to Galileo board??? If you can can you please explain the coding part

The example actually read the data sent by the browser;

char c = client.read();

however, it doesn't save the entire data sent by the browser because it's only looking for the reply to be sent. I think you should:

a) read those every data in a String or something similar

b) analyze received data

c) process/do what it is needed to do

d) reply to the browser accordingly

HTH,

Fernando.

0 Kudos
Highlighted
Novice
6 Views

if i am using a Button, if i press that button some actions to be performed by Galileo.. By using "client.read" is it possible to understand the action on the button?

0 Kudos
Highlighted
Community Manager
6 Views

Hi AkhilVijayakumar,

 

 

I recommend you to check the following example: https://www.arduino.cc/en/Tutorial/Wifi101SimpleWebServerWiFi https://www.arduino.cc/en/Tutorial/Wifi101SimpleWebServerWiFi. This example is for Wi-Fi, however what I'd like you to check is how a LED can be turn on/off through clicking buttons (link tags) on the web page.

 

 

In order to test this example code you would have to adapt it so you can use it by Ethernet.

 

 

Regards,

 

Diego
0 Kudos
Highlighted
Novice
6 Views

Thank You very much Diego.. With some modification of WifiServer program and Ethernet Web Server program, it is now able control GPIO pins from web site

0 Kudos