Quantcast
Channel: Seeedstudio Forum
Viewing all articles
Browse latest Browse all 6612

Using Wifi Shield WLS06201P with Mega

$
0
0
I have the Wifi Shield WLS06201P connected to my Mega:
Code:Remove the header jumpers from the TX/RX pins
Jumper WIFI_TX  to Mage Pin 10 (black wire in photo)
Jumper WIFI_RX to Mega Pin 11 (yellow wirein photo)
Alter the definition of WiFly class for pins 10,11: WiflyClass Wifly(10,11);

Attachments pingable.jpg
pingable.jpg [ 214.34 KiB | Viewed 129 times ]

What this does is allow the shield's library, which uses the SoftwareSerial class, to communicate with the Mega using pins 10 and 11. The Mega doesn't support SoftwareSerial on pins 0-7: "Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69"

The WiFly device is now pingable. I have some garbage in my serial port monitor, but those characters are the "connection refused" TCPIP packet returned from the computer I am connecting to. Now I can get to work on a communication protocol between the Mega and other computers.
Attachments Screen Shot 2013-03-17 at 12.35.10 PM.png
Screen Shot 2013-03-17 at 12.35.10 PM.png [ 130.35 KiB | Viewed 129 times ]


Statistics : Posted by wsanders • on Mon Mar 18, 2013 4:03 am • Replies 4 • Views 129

Viewing all articles
Browse latest Browse all 6612

Trending Articles