我也买了盾,并有麻烦开始。
如果您已将焊接到屏蔽层上的引脚固定好,但请确保检查它们都有连接,并且没有焊料从引脚的脚上滑落,因为这会导致屏蔽层变得不稳定。
运行下面的代码是从WiFly库(阿尔法版本2),可以在这里找到: http://forum.sparkfun.com/viewtopic.php?f=32&t=25216&start=30
一旦你看到的是,屏蔽已连接,会要求您输入,类型$$$然后按回车键......您现在已进入命令行并显示CMD。
如果您不知道您的网络设置类型扫描,这将显示它们。 然后通过输入set wlan auth 3(混合WPA1 & WPA2-PSK)或设置wlan auth 4(WPA2-PSK)来设置您的身份验证,这取决于您的身份验证类型,因此请为您的网络选择写入身份验证。
然后键入设置WLAN短语YourPharsePhrase(更改YourPharsePhrase到任何您的WPA密钥) 然后键入加入YourSSIDName(更改YourSSIDName到无论您的网络名称)
你看到这样的事情: 加入YourSSIDName 汽车-Assoc YourSSIDName chan = 1 mode = MIXED SCAN OK 立即加入YourSSIDName .. < 2.15>关联! DHCP:开始在1234ms DHCP,租赁= 86400秒 IF = UP DHCP = ON IP = 10.0.0.116:2000 NM = 255.255.255.0 GW = 10.0.0.1 侦听2000
你现在连接到您的网络。
希望这会让你启动和运行。 N.B.记得仔细检查你的PIN码!我遇到了很大的麻烦,因为只需要少量的焊料,但足以获得良好的连接,这种平衡很微小,但足以使其无法工作。最后我用放大镜来检查我的。
#include "WiFly.h" // We use this for the preinstantiated SpiSerial object.
void setup() {
Serial.begin(9600);
Serial.println("SPI UART on WiFly Shield terminal tool");
Serial.println("--------------------------------------");
Serial.println();
Serial.println("This is a tool to help you troubleshoot problems with the WiFly shield.");
Serial.println("For consistent results unplug & replug power to your Arduino and WiFly shield.");
Serial.println("(Ensure the serial monitor is not open when you remove power.)");
Serial.println();
Serial.println("Attempting to connect to SPI UART...");
SpiSerial.begin();
Serial.println("Connected to SPI UART.");
Serial.println();
Serial.println(" * Use $$$ (with no line ending) to enter WiFly command mode. (\"CMD\")");
Serial.println(" * Then send each command followed by a carriage return.");
Serial.println();
Serial.println("Waiting for input.");
Serial.println();
}
void loop() {
// Terminal routine
// Always display a response uninterrupted by typing
// but note that this makes the terminal unresponsive
// while a response is being received.
while(SpiSerial.available() > 0) {
Serial.write(SpiSerial.read());
}
if(Serial.available()) { // Outgoing data
//SpiSerial.print(Serial.read(), BYTE);
SpiSerial.write(Serial.read());
}
}
对于[Electrical Engineering SE](http://electronics.stackexchange.com/),这可能不是更好吗?或者[Arduino Forum](http://arduino.cc/forum/)呢? – Bart 2012-03-31 13:15:10
我在这里看到了关于Arudino的一些问题和回答。所以我想我可能会在这里得到一些意见。 – Riddle 2012-03-31 13:28:31
你有没有试过[this](http://forum.sparkfun.com/viewtopic.php?f=32&t=25129)。我很努力地理解“听到的ping *”是什么或者“将它堆叠为*”可能意味着什么。 – Clifford 2012-04-01 09:40:48