2

I'm using an AdaFruit CC3000 Wifi shield as an HTTP server with an Arduino Uno.

I have a script which works fine -- logs into my Wifi and listens for connections as it should.

However, I want to use an infrared library which writes to the CC33000 default IRQ 3, so to avoid conflict I change the following setting:

#define ADAFRUIT_CC3000_IRQ   3  // MUST be an interrupt pin!

to the only other Interrupt pin

#define ADAFRUIT_CC3000_IRQ   2  // MUST be an interrupt pin!

The device hangs at "Initializing" .. or at least I see neither of the subsequent lines in the following code on my serial monitor:

Serial.println(F("\nInitializing..."));
  if (!cc3000.begin())
  {
    Serial.println(F("Couldn't begin()! Check your wiring?"));
    while(1);
  }

  Serial.print(F("\nAttempting to connect to ")); Serial.println(WLAN_SSID);
  if (!cc3000.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY)) {
    Serial.println(F("Failed!"));
    while(1);
  }

I've stripped everything back down to just the example code for HTTPServer to ensure it's not a conflict with my own code or the IR Library. I've changed the setting from 2 to 0 and 1 thinking there was some confusion over literal IRQs vs Pins, but those settings generate the "Couldn't begin" error trap.

Is there any other setting that I need to vary in order to get the CC3000 to opearate on IRQ 2 or is this a hardware bug and I'm out of luck if I want to use Pin 3?

1 Answer 1

1

It is a "hardware bug" as you so aptly put it. As far as I know, the only way to get the CC3000 board to use pin 2 as the IRQ is to physically rewire the connections. I did exactly that on my board and it works without a problem, leaving pin 3 free to use for whatever else you want. You can see what I did here. It basically involves cutting the trace wire and running a jumper cable between the holes next to the pins.

The important thing to understand perhaps is that pins 2 and 3 are available to use for IRQ on the Mega and Uno, but it is an actual dedicated pin on the CC3000, hence why you have to go to this effort to change it. Also remember that once you have cut the trace to pin 3 it becomes an open/free pin and is no longer connected to the wifi shield. By the sounds of your requirements this shouldn't matter, but it is still useful to know.

If you haven't already, I recommend that you read the documentation for the CC3000 board, as it really helped me understand the irritating intricacies.

But yeah, if you choose to follow this and reroute the pin, it works perfectly. Hope this helps, even if it is a bit late.

1
  • 1
    Thanks, bladepanthera! I ended up figuring out how to switch the IR Library I was using to another pin, and that solved the immediate problem for me, but it's really good to know this for future reference and I hope it saves others some hair-pulling.
    – brianfit
    May 16, 2015 at 5:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.