Snippet - WiFi Ethernet Switching Http Client Example

WiFi Ethernet Switching Http Client Example

This application retrieves webpages from every 10 seconds using the HttpClient class in a thread. The application tries to connect to the internet through ethernet by default. If the ethernet cable is disconnected, it will switch to wifi. If the ethernet cable gets connected back, the wifi connection will be terminated and will switch back to ethernet.

Which mainboard is this setup for?

static WiFiRS9110 wifi = new WiFiRS9110(SPI.SPI_module.SPI1, (Cpu.Pin)2, (Cpu.Pin)26, (Cpu.Pin)3);

What should this line look like for a Spider with the wifi module plugged into socket 9?


for spider socket 9 it should be

WiFiRS9110(SPI.SPI_module.SPI1, EMX.Pin.IO15, EMX.Pin.IO46, EMX.Pin.IO6);

not sure about Steven’s example.

Thank you very much @ RobvanSchelven now to see if I understand, if I was to use Socket 6 it would be:

WiFiRS9110(SPI.SPI_module.SPI2, EMX.Pin.IO10, EMX.Pin.IO18, EMX.Pin.IO20);

I think I learned something tonight, thanks.

YW, yes that’s right for socket 6 :slight_smile: