Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 5 months ago.
Adafruit CC3000 with m3pi(LPC1768)
[Because of the statement using machine translation, there is unnatural expression. I'm sorry. ]
[It is the last time become a thing similar to the question that I have posted. ]
I would like to the communication using Adafruit CC3000 Breakout on m3pi. However, I am not familiar with the specifications of the m3pi and CC3000, not able to move well as other question.
I'm using with modify the code of https://www.dropbox.com/s/hlzzfj1pkaqlcmw/cc3000_hello_world_demo2_full.zip?dl=0.
The modified and what is only "main.cpp".
main.cpp
#include "mbed.h"
#include "m3pi.h"
#include "cc3000.h"
#include "main.h"
m3pi m3pi;
using namespace mbed_cc3000;
cc3000 wifi(p9, p10, p8, SPI(p5, p6, p7), "ssid", "key", WPA2, false);//changed ssid/ key back to default
Serial pc(USBTX, USBRX);
int main() {
m3pi.locate(0,1);
m3pi.cls();
m3pi.printf("check");
init(); //board dependent init
pc.baud(115200);
wifi.init();
if (wifi.connect() == -1) {
m3pi.printf("Failed.");
} else {
m3pi.printf("Success.");
m3pi.printf("%s",wifi.getIPAddress());
m3pi.right(0.1);
wait(0.1);
}
wifi.disconnect();
m3pi.stop();
}
As far as I know, Currently I have pins of the Adafruit cc3000 breakout set up like this
- GND -> GND
- MOSI -> p5
- MISO -> p6
- CLK -> p7
- CS -> p8
- IRQ -> p9
- VBEN -> p10
However how I do not know what to power supply to the VIN. Also, when you compile it, m3pi will hangs in the line of "cc3000 wifi ()".
I what to do, please comment.