![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
OSC meeseage tranceiver(Sender/Receiver) for Sparkfun CC3000 WiFi Shield. Supports the following boards: FRDM-KL25Z,ST Nucleo F401RE,ST Nucleo F030R8,LPCXpresso1549,Seeduino-Arch-Pro.
Dependencies: cc3000_hostdriver_mbedsocket mbed
Diff: main.cpp
- Revision:
- 1:e62251d890c1
- Parent:
- 0:eadd1c588343
--- a/main.cpp Sun Aug 31 15:10:45 2014 +0000 +++ b/main.cpp Wed Sep 03 13:12:02 2014 +0000 @@ -10,13 +10,17 @@ (3)ST Nucleo F030R8 (STM32F030) (4)LPCXpresso1549 (LPC1549) (5)Seeduino-Arch-Pro (ARCH_PRO) - + (6)FRDM-K64F (K64F) + Please push RESET button on CC3000 WiFi Shield to start the program. reference: https://www.sparkfun.com/products/12071 for CC300 Shield http://opensoundcontrol.org/introduction-osc for OSC(Open Sound Control) + date: 2014/9/3 + added supporting FRDM-K64F by: xshige + date: 2014/8/31 written by: xshige @@ -74,10 +78,11 @@ // define board you like (KL25Z, LPC1549, STM32F401, STM32F030 ...) //#define KL25Z -#define STM32F401 +//#define STM32F401 //#define STM32F030 //#define LPC1549 //#define ARCH_PRO +#define K64F // define SSID, PASSWORD you like #define SSID "sssid" @@ -113,6 +118,12 @@ cc3000 wifi(P0_4, P2_5, P0_6, SPI(P0_9, P0_8, P0_7), SSID, PASSWORD, WPA2, false); Serial pc(USBTX, USBRX); #endif +#if defined(K64F) +// for FRDM-K64F +cc3000 wifi(PTB9, PTC3, PTD0, SPI(PTD2, PTD3, PTD1), SSID, PASSWORD, WPA2, false); +Serial pc(USBTX, USBRX); +#endif + // OSC related #include "OSCmsgCodec.h" @@ -142,6 +153,8 @@ wifi.init(); if (wifi.connect() == -1) { printf("Failed to connect. Please verify connection details and try again. \n"); + printf("You should check your ssid, password.\n"); + wait(60); } else { printf("IP address: %s \n", wifi.getIPAddress()); } @@ -165,7 +178,7 @@ pc.printf("This OSC msg sent:\n%s %s %f\n", outmsg[0].address, outmsg[1].typeTag, outmsg[2].f); pc.printf("to: %s\n", sendto_ip); pc.printf("-------------------\n"); - wait_ms(10); + //wait_ms(10); while (true) { #if 0 @@ -184,7 +197,7 @@ pc.printf("This OSC msg sent:\n%s %s %f %f\n", outmsg[0].address, outmsg[1].typeTag, outmsg[2].f, outmsg[3].f); pc.printf("to: %s\n", sendto_ip); pc.printf("-------------------\n"); - wait_ms(10); + //wait_ms(10); #else // fader // send OSC message with random values (to touchOSC) @@ -201,7 +214,7 @@ pc.printf("This OSC msg sent:\n%s %s %f\n", outmsg[0].address, outmsg[1].typeTag, outmsg[2].f); pc.printf("to: %s\n", sendto_ip); pc.printf("-------------------\n"); - wait_ms(10); + //wait_ms(10); #endif // receive OSC message @@ -219,7 +232,7 @@ printf("-------------------\n"); // change IP to send strcpy(sendto_ip, client.get_address()); - wait_ms(10); + //wait_ms(10); }; } // while (true) }