Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
1,398 Views

Communication with Edison over WiFi

Jump to solution

Hello!

So, I completed setup, assembled an electronic circuit and wrote a program using ArduinoEdison that control a hardware relay.

Right now I can control the relay using a push button connected to Edison GPIO.

I want to be able to control this relay over wireless LAN.

I would appreciate for any suggestions how I can achieve this.

If there are any sample code that would be wonderful.

I understand how I can achieve this with Serial interface, but I would like to do it over WiFI...

Kind regards,

Alex

Tags (2)
0 Kudos

Accepted Solutions
Highlighted
Employee
8 Views

Hi APivovarov

You can use a ssh connection to your board with the Serial Console or you can use the IDE, take a look at the example: SimpleWebServerWiFi in the IDE, and change the line:

WiFiServer server(80); with WiFiServer server(81); Also you will need to put your ssid and password in the sketch.

In order to know which is the IP address of your board, run ifconfig in the Serial Console, the IP address is in wlan0 -- inet addr

After running the sketch, types the address in your web browser.

For example, if your IP address is 123.234.23.12. You will need to add the :81 at the end: 123.234.23.12:81

Regards;

CMata

View solution in original post

3 Replies
Highlighted
Employee
9 Views

Hi APivovarov

You can use a ssh connection to your board with the Serial Console or you can use the IDE, take a look at the example: SimpleWebServerWiFi in the IDE, and change the line:

WiFiServer server(80); with WiFiServer server(81); Also you will need to put your ssid and password in the sketch.

In order to know which is the IP address of your board, run ifconfig in the Serial Console, the IP address is in wlan0 -- inet addr

After running the sketch, types the address in your web browser.

For example, if your IP address is 123.234.23.12. You will need to add the :81 at the end: 123.234.23.12:81

Regards;

CMata

View solution in original post

Highlighted
Novice
8 Views

Hi CMata_Intel,

Thanks a lot. SimpleWebServerWiFi is exactly what I needed. I got it working and now I am adapting it for my needs.

I have small question: as my Edisson is already connected to WiFi, can I check some how if there is connection available and use it instead of reconnecting?

-ap

Highlighted
Employee
8 Views

Hi APivovarov

Using the Arduino IDE and that example, you could try to adapt the line "while ( status != WL_CONNECTED) {" in the sketch I think that something like that could work for you

Regards;

CMata