Hi, I am new to arduino (not microcontroller though) and am trying to hook up a wifly shield to my arduino uni. The shield is RN-131C.
I am following a guide on sparkfun website, WiFly Shield Hookup Guide - SparkFun Learn
I have added the library to the arduino folder. However when I go to verify an example sketch I am getting an error message. I am trying to verify the SpiUartTerminal sketch.
My error message is SpiSerial was not declared in this scope. I have added a screen shot to help you out.
Thanks for spending the time to look at my post and welcome any help.
Seems you haven't installed the library as you were told on the tutorial site. BTW, for next time: we need the complete error message not just the last two lines.
thanks for your reply. Im fairly sure that I have installed the library. I have got a friend to try it out too and no success. hopefully this screen will help.
Here is the code too
/*
SpiUartTerminal - tool to help troubleshoot problems with WiFly shield
This code will initialise and test the SC16IS750 UART-SPI bridge then enable you
to send commands to the WiFly module.
Copyright (c) 2010 SparkFun Electronics. http://sparkfun.com LGPL 3.0
*/
#include <SPI.h>
#include <WiFly.h>
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) {
#if ARDUINO >= 100
Serial.write(SpiSerial.read());
#else
Serial.print(SpiSerial.read(), BYTE);
#endif
}
if(Serial.available()) { // Outgoing data
#if ARDUINO >= 100
SpiSerial.write(Serial.read());
#else
SpiSerial.print(Serial.read(), BYTE);
#endif
}
}
Where is the complete output of the compiler? Either it complained about the missing WiFly.h file or you have an older version of WiFly installed, because the current version contains these lines:
My guess is you have two different versions of the WiFly library installed and the system is choosing the older one because it's in a higher priorized path. Look at all the possible paths where libraries can be installed (differs between the OSes) for another copy of WiFly.
We will have to extract only the folder under '\WiFly-Shield-master\Libraries' in the zipped file to the /arduino/libraries folder and rename the folder from 'WiFly_Shield' to 'Wifly'.