Jump to content

Search the Community

Showing results for tags 'cc3200'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks

Calendars

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Location


Interests


Sparkfun


Github

Found 177 results

  1. Hi, I am using CC 3200 in ap mode first then when I feed the cc3200 with ssid and password it starts its STA mode. But sometimes cc3200 hangs when shifting from ap 2 sta mode. And when the reset button is pressed my cc3200 connects to ssid that i sent. Why is that happening? Is there any way by which I can do a software reset? I know about the watchdog timer but how to use it in this case. I am pasting my connection code here. #ifndef __CC3200R1M1RGC__ #include <SPI.h> #endif #include <WiFi.h> #include <udma_if.h> const char ssid[] = "CC3200"; const char wifipw[] = "password"; const char s[2] = "-"; char *token; String y = ""; char Rssid[100],Rpsk[100]; unsigned int Port =2390; char packetBuffer[255]; IPAddress Ip(255,255,255,255); char d_name[]="Device Name:Texas Instruments CC3200 Board,\n"; char d_id[]="Device Id:1,\n"; char d_type[]="Device type:Controller with Wi-Fi,\n"; char ReplyBuffer[] = "Device IP is:"; char b[1024]; int j=0; WiFiUDP Udp; void setup() { Serial.begin(115200); pinMode(RED_LED, OUTPUT); // LED will toggle when clients connect/disconnect digitalWrite(RED_LED, LOW); Serial.print("Setting up Access Point named: "); Serial.println(ssid); Serial.print("AP uses WPA and password is: "); Serial.println(wifipw); WiFi.beginNetwork((char *)ssid, (char *)wifipw); while (WiFi.localIP() == INADDR_NONE) { // print dots while we wait for the AP config to complete Serial.print('.'); delay(300); } Serial.println(); Serial.println("AP active."); printWifiStatus(); Udp.begin(Port); } unsigned int num_clients = 0; void loop() { unsigned int a, i; a = WiFi.getTotalDevices(); // Did a client connect/disconnect since the last time we checked? if (a != num_clients) { if (a > num_clients) { // Client connect digitalWrite(RED_LED, !digitalRead(RED_LED)); Serial.println("Client connected! All clients:"); for (i = 0; i < a; i++) { Serial.print("Client #"); Serial.print(i); Serial.print(" at IP address = "); Serial.print(WiFi.deviceIpAddress(i)); Serial.print(", MAC = "); Serial.println(WiFi.deviceMacAddress(i)); } } else { // Client disconnect digitalWrite(RED_LED, !digitalRead(RED_LED)); Serial.println("Client disconnected."); } num_clients = a; } int packetSize = Udp.parsePacket(); if (packetSize) { int len = Udp.read(packetBuffer, 255); if (len > 0)packetBuffer[len] = 0; //unit=atoi(packetBuffer); Serial.println(packetBuffer); /* get the first token */ token = strtok(packetBuffer, s); int w = 0; while( token != NULL ) { if(w == 0){ strcpy(Rssid,token); Serial.println(Rssid); w++; }else if(w == 1){ strcpy(Rpsk,token); Serial.println(Rpsk); } token = strtok(NULL, s); } /* int retVal; retVal = sl_WlanSetMode(ROLE_STA); retVal = sl_Stop(30); retVal= sl_Start(NULL, NULL, NULL); */ UDMAInit(); sl_Start(NULL, NULL, NULL); sl_WlanDisconnect(); sl_NetAppMDNSUnRegisterService(0, 0); sl_WlanRxStatStart(); sl_WlanSetMode(ROLE_STA); /* Restart Network processor */ sl_Stop(30); sl_Start(NULL, NULL, NULL); // attempt to connect to Wifi network: Serial.print("Attempting to connect to Network named: "); delay(5000); // print the network name (SSID); Serial.println(Rssid); // Connect to WPA/WPA2 network. Change this line if using open or WEP network: WiFi.begin(Rssid, Rpsk); while ( WiFi.status() != WL_CONNECTED) { // print dots while we wait to connect Serial.print("."); delay(300); } Serial.println("\nYou're connected to the network"); Serial.println("Waiting for an ip address"); while (WiFi.localIP() == INADDR_NONE) { // print dots while we wait for an ip addresss Serial.print("."); delay(300); } Serial.println("\nIP Address obtained"); // you're connected now, so print out the status printWifiStatus(); } } void printWifiStatus() { Serial.print("SSID: "); Serial.println(WiFi.SSID()); IPAddress ip = WiFi.localIP(); sprintf(b,"%d.%d.%d.%d,",ip[0],ip[1],ip[2],ip[3] ); Serial.print("IP Address: "); Serial.println(ip); long rssi = WiFi.RSSI(); Serial.print("signal strength (RSSI):"); Serial.print(rssi); Serial.println(" dBm"); }
  2. Hello All, Iam working with Redbear micro cc3200, and using energia 17 version for my development. Iam facing some issue EEPROM handling , Where are the EEPROM library available how to install this EEPROM lbrary to energia 17 version I have got EEPROM.h file but still i think some path is issue , as iam still getting issue EEPROM.H no such file or directory found. Thanks in advance , Regards Narasimhaj +91-9901544165 sketch_jan21a.cpp:31:14: fatal error: .h: No such file or directory #include <.h> ^ compilation terminated.
  3. Hello, If I use Energia IDE with CC3200 then Is Energia can support CC3200 APIs during programming? If Yes, then in which language programming I do in Energia with APIs? Regards, Pratik
  4. Hello! I recently started playing with Energia and the CC3200 LaunchPad. I tried the example for "attachInterrupt" in the link: http://energia.nu/reference/attachinterrupt/ I changed the code a little by modifying pinMode and attachIntterrupt #define PUSH 4 ... pinMode(PUSH, INPUT); // I want Pin 4 as my interrupt or SW3 on the board, only Input because the board has a pull down resistor already attachInterrupt(PUSH, blink, FALLING); } void loop() { ... } When I run this example, the interrupt is serviced multiple times at random without me touching the button. I wanted to know if anybody else has encountered the same problem or could someone try it and let me know if the interrupt works for them? I'm not sure what I'm doing wrong. Any advice is welcomed! Thank You!
  5. Hi, I am working with cc3200. I want my device to be able to connect to any network. I want to enable ap mode on energia and then enter networks ssid and password and switch to station mode?? I am new to cc3200 ? can somebody post his/her code of energia here along with changes required in header files or cpp files. Please reply asap
  6. friends i'm trying to work with CC3200 with NFC boosterpack by SPI communication.i have downloaded a file (http://www.ti.com/lit/zip/sloc297) .which is compatible with msp430g2553. since i'm not professional enough to change the headers and libraries to work with cc3200. i need help from you guys to make it compatible with cc3200. any kind of help towards this is welcome thanks in advancesloc297.zip
  7. I try to switch ap mode to sta mode but it seem to be freezed. Can anybody help me Here is my code #include "Energia.h" // Include application, user and local libraries #ifndef __CC3200R1M1RGC__ #include <SPI.h> // Do not include SPI for CC3200 LaunchPad #endif #include <WiFi.h> extern "C" { #include "utility/udma_if.h" #include "utility/simplelink.h" } // Define structures and classes // Define variables and constants char wifi_name[] = "energia"; char wifi_password[] = "launchpad"; char ssid[15], passwd[15]; WiFiServer myServer(80); uint8_t oldCountClients = 0; uint8_t countClients = 0; int sign = 0; // Add setup code void setup() { Serial.begin(115200); delay(500); Serial.println("*** LaunchPad CC3200 WiFi Web-Server in AP Mode"); // Start WiFi and create a network with wifi_name as the network name // with wifi_password as the password. Serial.print("Starting AP... "); WiFi.beginNetwork(wifi_name, wifi_password); while (WiFi.localIP() == INADDR_NONE) { // print dots while we wait for the AP config to complete Serial.print('.'); delay(300); } Serial.println("DONE"); Serial.print("LAN name = "); Serial.println(wifi_name); Serial.print("WPA password = "); Serial.println(wifi_password); pinMode(RED_LED, OUTPUT); // set the LED pin mode digitalWrite(RED_LED, LOW); pinMode(GREEN_LED, OUTPUT); // set the LED pin mode digitalWrite(GREEN_LED, LOW); pinMode(YELLOW_LED, OUTPUT); // set the LED pin mode digitalWrite(YELLOW_LED, LOW); IPAddress ip = WiFi.localIP(); Serial.print("Webserver IP address = "); Serial.println(ip); Serial.print("Web-server port = "); myServer.begin(); // start the web server on port 80 Serial.println("80"); Serial.println(); } // Add loop code void loop() { countClients = WiFi.getTotalDevices(); // Did a client connect/disconnect since the last time we checked? if (countClients != oldCountClients) { if (countClients > oldCountClients) { // Client connect // digitalWrite(RED_LED, !digitalRead(RED_LED)); Serial.println("Client connected to AP"); for (uint8_t k = 0; k < countClients; k++) { Serial.print("Client #"); Serial.print(k); Serial.print(" at IP address = "); Serial.print(WiFi.deviceIpAddress(k)); Serial.print(", MAC = "); Serial.println(WiFi.deviceMacAddress(k)); Serial.println("CC3200 in AP mode only accepts one client."); } } else { // Client disconnect // digitalWrite(RED_LED, !digitalRead(RED_LED)); Serial.println("Client disconnected from AP."); Serial.println(); } oldCountClients = countClients; } WiFiClient myClient = myServer.available(); if (myClient) { // if you get a client, Serial.println(". Client connected to server"); // print a message out the serial port char buffer[150] = {0}; // make a buffer to hold incoming data int8_t i = 0; String mystring; while (myClient.connected()) { // loop while the client's connected if (myClient.available()) { // if there's bytes to read from the client, char c = myClient.read(); // read a byte, then Serial.write(c); // print it out the serial monitor if (c == '\n') { // if the byte is a newline character // if the current line is blank, you got two newline characters in a row. // that's the end of the client HTTP request, so send a response: if (strlen(buffer) == 0) { // HTTP headers always start with a response code (e.g. HTTP/1.1 200 OK) // and a content-type so the client knows what's coming, then a blank line: myClient.println("HTTP/1.1 200 OK"); myClient.println("Content-type:text/html"); myClient.println(); // the content of the HTTP response follows the header: myClient.println("<html><head><title>Energia CC3200 WiFi Web-Server in AP Mode</title></head><body align=center>"); myClient.println("<h1 align=center><font color=\"red\">LaunchPad CC3200 WiFi Web-Server in AP Mode</font></h1>"); myClient.print("Red LED <button onclick=\"location.href='/RH'\">HIGH</button>"); myClient.println(" <button onclick=\"location.href='/RL'\">LOW</button><br>"); myClient.print("Green LED <button onclick=\"location.href='/GH'\">HIGH</button>"); myClient.println(" <button onclick=\"location.href='/GL'\">LOW</button><br>"); myClient.print("Yellow LED <button onclick=\"location.href='/YH'\">HIGH</button>"); myClient.println(" <button onclick=\"location.href='/YL'\">LOW</button><br>"); // The HTTP response ends with another blank line: myClient.println(); // break out of the while loop: break; } else { // if you got a newline, then clear the buffer: memset(buffer, 0, 150); i = 0; } } else if (c != '\r') { // if you got anything else but a carriage return character, buffer[i++] = c; // add it to the end of the currentLine } mystring = buffer; int seperate = mystring.indexOf(' '); String ssid1 = mystring.substring(0, seperate); String passwd1 = mystring.substring(seperate + 1); ssid1.toCharArray(ssid, sizeof(ssid1)); passwd1.toCharArray(passwd, sizeof(passwd1)); Serial.println("my wifi is"); Serial.println(ssid); Serial.println(passwd); } } // close the connection: myClient.stop(); Serial.println(". Client disconnected from server"); Serial.println(); WiFi._initialized = false; WiFi._connecting = false; UDMAInit(); sl_Start(NULL, NULL, NULL); sl_WlanDisconnect(); sl_NetAppMDNSUnRegisterService(0, 0); sl_WlanRxStatStart(); sl_WlanSetMode(ROLE_STA); /* Restart Network processor */ sl_Stop(0xFF); sl_Start(0, 0, 0); sign = 1; } if (sign == 1){ Serial.println(WiFi.begin((char*) ssid,(char*) passwd), DEC); while ( WiFi.status() != WL_CONNECTED) { // print dots while we wait to connect Serial.print("."); delay(300); } Serial.println("connected"); } }
  8. Hi all, How to run MQTT server on cc3200 from energia. Is there any libarary to do so?
  9. Agam

    CC3200 OS mode

    Hi all, how to run os mode(multiple threads) on cc3200 from energia.
  10. Hi, I am working on a project that reads the values from the weighing machine and the data is then sent to cc3200 web server from where a client can access the data. For dynamic change of data on web page i am refreshing the page at 0.5 seconds.Everything is working as expected. Now the new requirement is that a user has to enter some predefined value on web page and after that the further calculation is to be done. I am unable to do so.How to Enter any value on web page and then obtain that value in my code and then do further processing.
  11. I have a project using an MLX90614 that I have prototyped on an Arduino. Now I want to move to the CC3200 to add WiFi support. I've been fighting with the I2C for a few days now and could use some help. A few notes: The built-in I2C sensors (BMA222 and TMP006) work fine in the default configuration. The max speed for the MLX90614 is 100 KHz, but the default for the CC3200 is 400 KHz The MLX90614 is technically SMBus, but it works flawlessly with the Wire library on a standard Arduino. I have modified the Wire library in the hardware/cc3200 folder to call MAP_I2CMasterInitExpClk(I2C_BASE, F_CPU, false) instead of MAP_I2CMasterInitExpClk(I2C_BASE, F_CPU, true). According to the code in driverlib/i2c.c, this should cause the bus to run at 100 KHz. This change does not make the MLX90614 work, but it does cause the other two sensors (BMA222 and TMP006) stop functioning properly. (The TMP006 fails to be recognized, and the BMA222 returns incorrect data - x, y, and z all seem to show the x value or the y value... not sure which.) After searching the web and this forum, this I've gotten this far but now run into a dead end. Does anybody have experience with I2C on the CC3200 with Energia and a slower-speed bus? I'd like to avoid rewriting my project in CCS if possible. Thanks much! -Nathan
  12. I am using the SimpleWebServerWiFi example in Energia as a basis for my application, which has become a bit large. My trouble is, sometimes the update of the client web page requested is fast, while sometimes it is painfully slow without changing any code. There is only one web page. I have no idea where to start looking, is there any clues out there what can cause the web server of the cc3200 working slow? For example, if the output it is slow, hitting a button on the client web page, causes the server to fast reload the same page. regards,
  13. Hello. New here and having trouble getting my Mac Mini (10.12) to recognise the 3200 LauchpadXL. Other non-TI boards and FTDI adaptors show up fine in Arduino/Energia. Anybody got experience of why the port would not show? No obvious devices are showing in /dev Many thanks.
  14. Hi, I'm working on some of the project where I have to communicate CC3200 to external microcontroller (CC2650) using UART communication .Is the serial pass through or serial event example can work on CC 3200 to communicate with ex. microcontroller? I'm new to energia. Awaiting for your response on the same. Thanks & Regards, Shashank
  15. Dear All, I would appreciate some help from you here. I am using Energia v0101E0014 (v15) The uploaded picture shown my 3200LP jumper setting. The 3200LP is using SPI to talk to Cypress CY5FRAMKIT (http://www.cypress.com/?docID=52945) The Cypress kit is using its default 5V setting on jumper J5. So I connect P3.1 (5V) to feed the Cypress power. My Wiring for cc3200 is as below CC3200 Signal Name ---- ------- P1.7 SCLK P2.3 CS P2.6 MOSI P2.7 MISO P2.1 GND P3.1 5V However I can't read/write data to it. I was able to use the same kit in Arduino platform, so the kit is good. Q1: DO I need to anything special to the CC3200 default jumper setting in order to use the above SPI pin iterface? Q2: What is the CS pin number in Energia code if I use P2.3 as the CS ping? Is it number "8", "18" or ... ? Thanks in advance.
  16. Hi, During the last two days I wanted to give Energia a try for performance testing of CC3200 based modules. On first glance TCP/IP performance is better than ESP8266 but I stumbled over many issues and currently I don't know whom to ask for: Energia, TI, RedBearLabs, ... I faced the same issues with either TIs original CC3200 Launchpad XL and RedBearLabs Wifi Mini module. Even if you only have comments, thoughts or solutions for a single one of my issues, please post your answer and reference to the issues numbered below. (1) First I was able to run the OutOfBox and blink examples. Then after playing with my own skript using AP and station mode as well as fixed and dynamic IPs somehow the DHCP server was not working any more. I tried the OutOfBox example, and again no IPs were provided to the clients. It seems that the CC3200 module stores information in a place which is not overwritten by Energia when uploading new code but used by the underlying TCP/IP stack. After hours of experimenting I decided to format the flash with TIs UniFlash tool, and to install the newest service pack, and surprise, instantly the DHCP service was functional again. Question: What happend there, and how to prevent that in future? I cannot risk that the module gets unusable after selling to a customer! (2) Since the reformatting of the flash open APs do not work any more. It doesn't matter if I use WiFi.beginNetwork(ssid, "00000000") or WiFi.beginNetwork(ssid). The network in both cases is created in WPA2 mode requiring the password "00000000". I think but have no proof for that it was working before the re-flashing procedure... Question: How to create open AP again? Only guessing, but is it a problem of the current service pack? (3) If I use WiFi.config(apIP, apDNS, apGateway, apNetMask) before calling WiFi.beginNetwork() then the IP of the AP is changed as expected, e.g. to 192.168.5.1 but the DHCP remains in it old range, so the client gets 192.168.1.2 and can never reach the webserver at 192.168.5.1 (as it is running in another net). Question: How to change DHCP behaviour from Energia, and why is it not done automatically based on IP of AP? (4) The worst issue is related to the following line of code which I use in a loop for TCP/IP performance tests: currentTransferSizeReport = client.write(fileDownloadBuffer, currentTransferSize); If I increase the currentTransferSize up to 1460 bytes everything is working fine, transmission throughput increases as expected. If I go beyond 1460 then transmission throughput decreases, and on first glance everything looks right, but the receiver gets more data than transmitted! I tested my simulated file download with various browsers, and if I transmit exactly 100MByte these 100MByte appear in the browsers download folder only when using a block transfer size of <= 1460 bytes. In case of using larger sizes the received data file is larger, but not constant, I got up to 114 MBytes! So from my point of view it looks like a problem in the TCP/IP stack somehow related to transfer size and window size. My problem is that the transmission looks error-free (the server sees that the reported transfer size matches the requested one) but it is not. My cheap ESP8266 module currently reaches half the speed of the TI module but at least it transmits the data untouched! Question: What happens there, and how can I determine which transfer size to use to get my data transported safely without corruption if no errors are reported? (5) The String class constructor using a float value as input is not functional, it always delivers 0.000. From my point of view the dtostrf funtion is used, which tries to use sprintf, which is not implemented for floats within the Arduino source code for performance reasons. Question: Does it only happen on my system, so someting went wrong during Energia installation? I can hardly believe that such a basic function is not working (so has never been tested)? (6) After downloading code from Energia to RedBearLabs Wifi Mini module it got 4 quite similar error messages, the first one is DEBUG cc3200prog.c:2667: write failed However, the code has successfully been downloaded but not started, I have to press the reset button manually after downloading. These error messages do not appear when downloading code to TIs Launchpad. Whew, that's all for the moment. With best regards, Kelrob
  17. Hi, I am new to CC3200. Actually I want to use the Uart of cc3200. My application is to read data from a serial transmitter of another device using CC3200 and print the data on the serial monitor of Energia. I saw that there are two kinds:- Serial and Serial1. Can I use serial1 to read the data and then print data on serial monitor of Energia using Serial. Do I need to shift the J6,J7 from flash mode to BP mode?? I have seen the pinmapping. In that I found that Serial 1 is connected on UART1_Rx on GPIO11 i.e. P1-10 of CC3200 launchpad. Do I need to connect the peripheral devices' Tx pin on P1-10 and then print the data on Serial monitor using Serial.write(); ??
  18. Hi, Previously I was using CC3200 launch pad for developing my module. But now I want to use GPIOs and control leds etc on launch pad. When using normally, I used digitalWrite(pinnumber,1); But now I want to control led etc using GPIO. How to accomplish that in Energia. I have seen peripheral library for cc3200 , but I am not able to use it. Kindly help asap.
  19. Hello, I am attempting to use the CC3200 M2X Button press demo with no positive results. I am constantly getting a -1 error (No Connection). I can see on the on teh serial output that I have an IP address and that I'm connected to my WiFI router. I have also tried a similar demo (LaunchPadWiFiPost) using the MSP430F5969 with no issues. If anyone has any suggestions as to what is going on and why I am getting a no connection error I would appreciate any information. Kas
  20. I have modified the code and now the zero crossing interrupt is occurring.But the timer is still not functioning.Can anyone see and tell whether I have configured it right? #include "inc/hw_ints.h" #include "inc/hw_memmap.h" #include "inc/hw_timer.h" #include "inc/hw_types.h" #include "debug.h" #include "interrupt.h" #include "timer.h" #include "driverlib/prcm.h" #include "inc/hw_gprcm.h" #include "wiring_private.h" #include "driverlib/rom_map.h" #include "driverlib/pin.h" void setup() { pinMode(2,INPUT_PULLUP); pinMode(4,OUTPUT); noInterrupts(); MAP_PRCMPeripheralClkEnable(PRCM_TIMERA0,PRCM_RUN_MODE_CLK); MAP_PRCMPeripheralReset(PRCM_TIMERA0); MAP_TimerConfigure(TIMERA0_BASE,TIMER_CFG_B_PERIODIC_UP); MAP_TimerIntRegister(TIMERA0_BASE,TIMER_B,start); MAP_TimerIntEnable(TIMERA0_BASE,TIMER_TIMB_MATCH); MAP_TimerPrescaleSet(TIMERA0_BASE,TIMER_B,32); MAP_TimerMatchSet(TIMERA0_BASE,TIMER_B,7500); MAP_TimerLoadSet(TIMERA0_BASE,TIMER_B,0); MAP_TimerEnable(TIMERA0_BASE,TIMER_B ); attachInterrupt(2,zeroCrossingInterrupt, RISING); interrupts(); Serial.begin(9600); } void loop() { } void zeroCrossingInterrupt() { digitalWrite(4,LOW); MAP_TimerLoadSet(TIMERA0_BASE,TIMER_B,0); MAP_TimerEnable(TIMERA0_BASE,TIMER_B ); Serial.println("0k"); } void start() { digitalWrite(4,HIGH); MAP_TimerIntClear(TIMERA0_BASE,TIMER_TIMB_MATCH); MAP_TimerIntDisable(TIMERA0_BASE,TIMER_TIMB_MATCH); MAP_TimerDisable(TIMERA0_BASE,TIMER_B ); Serial.println("hi"); }
  21. Hi , I am unable to use the Timers of CC3200 on Energia. Kindly view my code snippet and see what errors have I made.I am getting the errors which I have mentioned at the last. CODE:- #include <driverlib/timer.h> #include <inc/hw_timer.h> void setup() { pinMode(2,INPUT_PULLUP); pinMode(9,OUTPUT); noInterrupts(); TimerIntStatus(TIMERA0_BASE,true); TimerDisable(TIMERA0_BASE,TIMER_A); TimerIntDisable(TIMERA0_BASE,TIMER_TIMA_MATCH); TimerConfigure(TIMERA0_BASE,TIMER_CFG_A_PERIODIC_UP); TimerPrescaleSet(TIMERA0_BASE,TIMER_A,32); TimerMatchSet(TIMERA0_BASE,TIMER_A,7500); TimerIntRegister(TIMERA0_BASE,TIMER_A,start); TimerControlStall(TIMERA0_BASE,TIMER_A,false); TimerControlLevel(TIMERA0_BASE,TIMER_A,false); attachInterrupt(0,zeroCrossingInterrupt, RISING); interrupts(); TimerIntEnable(TIMERA0_BASE,TIMER_TIMA_MATCH); } void loop() { } void zeroCrossingInterrupt() { digitalWrite(9,LOW); TimerEnable(TIMERA0_BASE,TIMER_A); } void start() { digitalWrite(9,HIGH); TimerDisable(TIMERA0_BASE,TIMER_A); } Errors:- In file included from sketch_aug17a.ino:1:0: C:\energia-0101E0014-windows\energia-0101E0014\hardware\cc3200\cores\cc3200/driverlib/timer.h:164:31: error: 'tBoolean' has not been declared tBoolean bInvert); ^ C:\energia-0101E0014-windows\energia-0101E0014\hardware\cc3200\cores\cc3200/driverlib/timer.h:168:31: error: 'tBoolean' has not been declared tBoolean bStall); ^ C:\energia-0101E0014-windows\energia-0101E0014\hardware\cc3200\cores\cc3200/driverlib/timer.h:193:59: error: 'tBoolean' has not been declared extern unsigned long TimerIntStatus(unsigned long ulBase, tBoolean bMasked); Kindly help asap.
  22. This is a Websocket client library written mostly in highlevel c(++) to make it easyier to take in. It was tested on a CC3200 and earlier on a TM4C1294 but I think it should work on anything that provides the WifiClient/EthernetClient interface, and has decent amounts of RAM. Current code is a bit rough, it contains debug prints and I have not made much optimization work with it, especially concerning long strings where it just allocates up to 64kbyte of ram, but hopefully the user has some control over what is returned and can keep it short(ish). It does not support frames over 65kbyte nor binary data at the moment, but its not too hard to implement if needed. At the moment there is only 1 callback, when data is recieved, more callbacks could be added for connect, disconnect, ping, pong, etc. Well work in progress Like my dht lib the source code is maintained on github and my part of the code is released to public domain. The zip includes sha1 and base64 code that I didnt write, links to their home is included in top of WebSocketClient files. WebSocketClient.zip
  23. godric

    CC3200 Wifi and analogRead

    Hi, I have a problem with analogRead and Wifi.begin. I'm using CC3200 and Energia to test. I connect one potentiometer to Pin_60 (ADC_CH3) and a PIR sensor to Pin_50. Here comes the joke. If i try to read the values : a= analogRead(24); b= digitalRead(30); the sketch works perfectly. But if i include the Wifi library, and I write Wifi.begin() in the setup, the values read aren't correct. What happen here? Are there something i'm forgetting? Affect Wifi to ADC?
  24. Hi All, This is my first post on the forum so apologize of any mistakes. So, yesterday I bought Redbearlab CC3200 Wifi Mini from Amazon. The out-of-box test successfully executed with the LED toggling on/off based on the button pressed on 192.168.11. But when I tried to upload the program using Energia, it was failed. Here is the message from Energia which I copy and paste it directly. Ubable to find RedBearLabs board: 1 Using HID to reset for RedBearLab board Opening \\.\COM40 Triggering bootloader.... Getting storage list Bootloader Version: 4 Silicon version ES1.32 or higher Bootloader version is 2, 1, 4, 0 It's a CC3200 device: PG1.33 or higher Switch UART pinmux to APPS Switch to NWP bootloader complete Load common boot command for PG1.33 or higher Bootloader version is 2, 0, 4, 0 BlockSize is 4096, number of blocks is 16 erasing 13 blocks starting from 0 I am using Eenergia-0101E0017. I have followed the "getting startup guide" from Energia, pay attention closely to the driver and check the COM port (mine is COM40), also have updated MK20 firmware. But still, those error occured. And this wasn't the end of story.... After that, I put my laptop to sleep, went to office, turned on my laptop, and I used the same USB port to charge my android phone. 8 hours later, I put my laptop back to sleep, went to home and then I turned back on my laptop.This time, I tried again to upload my Wifi Mini using Energia, and boom, Done flashing successfully. So until now, if I have a problem "failed to upload" using Energia, I repeat those steps: 1. make my laptop sleep. 2. wake up my laptop, connect android phone to the USB port. 3. make my laptop sleep again. 4. disconnect my android phone from USB port. 5. wake up my laptop. 6. connect wifi mini to USB port, open Energia and start flashing. Done. So, anyone have the explanation about this? Thank you.
  25. Hi , im looking for a sketch that is similar to ConnectWithWPA but that can work on WPA2-Enterprise. I have been unable to connect to my AP with WPA2-Enterprise login/password authentification. Here is what ConnectWithWPA looks like : /* This example connects to an unencrypted Wifi network. Then it prints the MAC address of the Wifi BoosterPack / LaunchPad, the IP address obtained, and other network details. Circuit: * CC3200 WiFi LaunchPad or CC3100 WiFi BoosterPack with TM4C or MSP430 LaunchPad created 13 July 2010 by dlf (Metodo2 srl) modified 31 May 2012 by Tom Igoe modified 2 July 2014 by Noah Luskey */ #ifndef __CC3200R1M1RGC__ // Do not include SPI for CC3200 LaunchPad #include <SPI.h> #endif #include <WiFi.h> // your network name also called SSID char ssid[] = "SSID"; // your network password char pass[] = "supersecret"; void setup() { //Initialize serial and wait for port to open: Serial.begin(9600); // attempt to connect to Wifi network: Serial.print("Attempting to connect to Network named: "); // print the network name (SSID); Serial.println(ssid); // Connect to WPA/WPA2 network. Change this line if using open or WEP network: WiFi.begin(ssid, pass); while ( WiFi.status() != WL_CONNECTED) { // print dots while we wait to connect Serial.print("."); delay(300); } Serial.println("\nYou're connected to the network"); Serial.println("Waiting for an ip address"); while (WiFi.localIP() == INADDR_NONE) { // print dots while we wait for an ip addresss Serial.print("."); delay(300); } Serial.println("\nIP Address obtained"); // you're connected now, so print out the status printCurrentNet(); printWifiData(); } void loop() { // check the network connection once every 10 seconds: delay(10000); printCurrentNet(); } void printWifiData() { // print your WiFi IP address: IPAddress ip = WiFi.localIP(); Serial.print("IP Address: "); Serial.println(ip); Serial.println(ip); // print your MAC address: byte mac[6]; WiFi.macAddress(mac); Serial.print("MAC address: "); Serial.print(mac[5], HEX); Serial.print(":"); Serial.print(mac[4], HEX); Serial.print(":"); Serial.print(mac[3], HEX); Serial.print(":"); Serial.print(mac[2], HEX); Serial.print(":"); Serial.print(mac[1], HEX); Serial.print(":"); Serial.println(mac[0], HEX); } void printCurrentNet() { // print the SSID of the network you're attached to: Serial.print("SSID: "); Serial.println(WiFi.SSID()); // print the MAC address of the router you're attached to: byte bssid[6]; WiFi.BSSID(bssid); Serial.print("BSSID: "); Serial.print(bssid[5], HEX); Serial.print(":"); Serial.print(bssid[4], HEX); Serial.print(":"); Serial.print(bssid[3], HEX); Serial.print(":"); Serial.print(bssid[2], HEX); Serial.print(":"); Serial.print(bssid[1], HEX); Serial.print(":"); Serial.println(bssid[0], HEX); // print the received signal strength: long rssi = WiFi.RSSI(); Serial.print("signal strength (RSSI):"); Serial.println(rssi); // print the encryption type: byte encryption = WiFi.encryptionType(); Serial.print("Encryption Type:"); Serial.println(encryption, HEX); Serial.println(); } Regards. Salah
×