Has anyone gotten the CC3000 module and library to work with an Arduino Micro?
When the module first came out, the documentation said Uno (and later Mega) only -- but from posts it seems as if people have been able to use other options. I'd like to use a Micro so I can make smaller projects, but still stay within the Arduinoverse.
Use CC3000 library with Arduino Micro?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Use CC3000 library with Arduino Micro?
Right now, something in the library disables compilation with any ATmega32U4-based processors (Leonardo, Micro, etc.).
I'm not certain what the problem is. But I believe that those boards will eventually be supported - I know of no reason why it wouldn't work.
I'm not certain what the problem is. But I believe that those boards will eventually be supported - I know of no reason why it wouldn't work.
-
- Posts: 10
- Joined: Sun Sep 01, 2013 7:46 pm
Re: Use CC3000 library with Arduino Micro?
Just came on here to ask exactly the same question...
It looks like various parts of the library are being built up to support the ATmega32U4 but I've had no luck getting it going yet.
So far, if I upload any code to use the CC3000, even with it disconnected, I get no response on the serial monitor at all.
It looks like various parts of the library are being built up to support the ATmega32U4 but I've had no luck getting it going yet.
So far, if I upload any code to use the CC3000, even with it disconnected, I get no response on the serial monitor at all.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Use CC3000 library with Arduino Micro?
This is a 32U4 thing - it has to do with Serial going through the on-chip USB port. To fix it, add this line immediately after the Serial.begin in setup() (make sure you include the semicolon)So far, if I upload any code to use the CC3000, even with it disconnected, I get no response on the serial monitor at all.
Code: Select all
while (!Serial);
-
- Posts: 10
- Joined: Sun Sep 01, 2013 7:46 pm
Re: Use CC3000 library with Arduino Micro?
OK, I gave that a try but I'm still not getting anything.
Any other script I upload works fine, I get Serial output etc. There is something in the CC3000 library which is preventing anything from happening. Doesn't seem to make any difference what I set the pins to.
Has anyone else got the CC3000 library running on an Arduino Pro Micro?
Any other script I upload works fine, I get Serial output etc. There is something in the CC3000 library which is preventing anything from happening. Doesn't seem to make any difference what I set the pins to.
Has anyone else got the CC3000 library running on an Arduino Pro Micro?
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Use CC3000 library with Arduino Micro?
Do you mean an Arduino Pro Mini? It won't run on a Mini - that's an ATmega168, it doesn't have enough SRAM.adafruit_support_rick wrote:Has anyone else got the CC3000 library running on an Arduino Pro Micro?
An Arduino Micro is a very different thing.
-
- Posts: 10
- Joined: Sun Sep 01, 2013 7:46 pm
Re: Use CC3000 library with Arduino Micro?
Yeah I'm referring to the SparkFun Pro MIcro. It's running an ATmega32u4.
Looks like I'm just using Pro Micro a little wrong. When I fire up the serial monitor it doesn't reset the device, so it was already getting stuck in the infinite loop after it couldn't detect the CC3000.
I threw in some serial/LED code to show that it was stuck in said loop and it's coming up just fine.
Now that it's running, I just have to sort the pins out...
Looks like I'm just using Pro Micro a little wrong. When I fire up the serial monitor it doesn't reset the device, so it was already getting stuck in the infinite loop after it couldn't detect the CC3000.
I threw in some serial/LED code to show that it was stuck in said loop and it's coming up just fine.
Now that it's running, I just have to sort the pins out...
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Use CC3000 library with Arduino Micro?
It still won't run. It will tell you that you don't have a valid IRQ pin. There is some conditional compilation in the library which doesn't work with the ATmega32U4.
-
- Posts: 10
- Joined: Sun Sep 01, 2013 7:46 pm
Re: Use CC3000 library with Arduino Micro?
Yeah, I see what you mean now. I took out the condition to allow the Pro Micro to work anyway and it seems just fine.
Is now...
I'm not sure if all those pin interrupts work but pin 2 just worked fine. I'll give the others a shot and see what I get.
Code: Select all
#elif defined(__AVR_ATmega32u4__)
7, 4,
3, 0,
2, 1,
0, 2,
1, 3,
#endif
Code: Select all
#else
7, 4,
3, 0,
2, 1,
0, 2,
1, 3,
#endif
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Use CC3000 library with Arduino Micro?
Cool. I'm not sure what's up with that - something is undefining the symbol __AVR_ATmega32u4__, but I couldn't find where that was happening. So, that one location must be the only dependency.
- ranger9
- Posts: 53
- Joined: Tue Nov 23, 2010 8:05 pm
Re: Use CC3000 library with Arduino Micro?
So to return to my original question: Does the above response mean that if I make the above code change, I'll be able to use my CC3000 board with the Adafruit-designed Arduino Micro?adafruit_support_rick wrote:This is a 32U4 thing - it has to do with Serial going through the on-chip USB port. To fix it, add this line immediately after the Serial.begin in setup() (make sure you include the semicolon)So far, if I upload any code to use the CC3000, even with it disconnected, I get no response on the serial monitor at all.Code: Select all
while (!Serial);
Thanks...
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Use CC3000 library with Arduino Micro?
That change will make the serial output look right, but to make the CC3000 work, you'll have to make the same modification that d.iablo_sv21 made. That was done in Adafruit_CC3000.cpp
-
- Posts: 2
- Joined: Mon Mar 11, 2013 2:26 pm
Re: Use CC3000 library with Arduino Micro?
Hi,
Did anyone manage to get this hack working? I'm using the Adafruit Arduino Micro, and applied the Serial fix and the edit to the #if...else statements. It's says it's initialising using the buildtest example, but doesn't get past that.
Did anyone manage to get this hack working? I'm using the Adafruit Arduino Micro, and applied the Serial fix and the edit to the #if...else statements. It's says it's initialising using the buildtest example, but doesn't get past that.
Code: Select all
Hello, CC3000!
RX Buffer : 131 bytes
TX Buffer : 131 bytes
Free RAM: 1779
Initialising the CC3000 ...
-
- Posts: 10
- Joined: Sun Sep 01, 2013 7:46 pm
Re: Use CC3000 library with Arduino Micro?
Yeah I've got it working on the Sparkfun Pro Micro, but only using interrupt pins 2 and 3. 0, 1 and 7 haven't been any good for me.
-
- Posts: 2
- Joined: Mon Mar 11, 2013 2:26 pm
Re: Use CC3000 library with Arduino Micro?
OK, cool, got it working.
I had to connect to the hardware clk, miso, and mosi lines for the micro, rather than the 13,12,11 for the UNO.
Many thanks.
I had to connect to the hardware clk, miso, and mosi lines for the micro, rather than the 13,12,11 for the UNO.
Many thanks.
Please be positive and constructive with your questions and comments.