Search the Community

Showing results for tags 'cc3100'.



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.


Found 9 results

  1. Hello, I recently ported over an Energia sketch that had working WiFi functionality in order to help with remote logging for a project I'm working on. The WiFi works well, but now the CCS code that was handling the ADC interrupts and measuring data is no longer functioning. If possible, I would like to make minimal changes to the CCS code as it was working exactly as we desired. I feel like there must be a relatively simple fix that I'm missing but I can't seem to figure it out. Can someone please help figure out what's wrong the ADC interrupt in the following code? #include <stdint.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <math.h> #include "inc/hw_types.h" #include "inc/hw_gpio.h" #include "inc/hw_memmap.h" #include "inc/hw_ints.h" #include "sysctl.h" #include "gpio.h" #include "driverlib/gpio.h" #include "driverlib/timer.h" #include "driverlib/interrupt.h" #include "driverlib/debug.h" #include "driverlib/adc.h" #include "inc/tm4c123gh6pm.h" #include <string.h> #include <WiFiClient.h> #ifndef __CC3200R1M1RGC__ // Do not include SPI for CC3200 LaunchPad #include <SPI.h> #endif #include <WiFi.h> // your network name also called SSID char ssid[] = ""; // your network password char password[] = ""; WiFiClient client; IPAddress server(); uint16_t port = ; #define SAMPLING_RATE 80000.0 // #define TARGET_FREQUENCY 10000.0 // #define BLOCK_SIZE 80 #define BUFFER_SIZE 255 //result cannot be declared in interrupt handler uint8_t flag = 0; uint32_t buffer[BUFFER_SIZE]; uint32_t bufferIndex = 0; float goertzel(uint32_t buffer[]) { int k, i; const float floatN = (float)BLOCK_SIZE; float omega; k = (int) (0.5 + ((floatN * TARGET_FREQUENCY ) / SAMPLING_RATE)); omega = (2.0 * 3.14 * k)/floatN; float sine = sin(omega); float cosine = cos(omega); float coeff = 2.0 * cosine; float Q0 = 0; float Q1 = 0; float Q2 = 0; float scaling_factor = BLOCK_SIZE/2.0; for (i = 0; i < BUFFER_SIZE; i++) { Q0 = coeff * Q1 - Q2 + buffer[i]; Q2 = Q1; Q1 = Q0; } float imag, real, result; real = (Q1 - Q2 * cosine) / scaling_factor; imag = (Q2 * sine) / scaling_factor; result = sqrtf(real * real + imag * imag); return result; } void ADC3IntHandler(void) { float result = 0.0; ADCIntClear(ADC0_BASE, 3); if (flag == 0) { //GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_0, GPIO_PIN_0); flag = 1; } else { //GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_0, 0); flag = 0; } if (bufferIndex >= 255) { bufferIndex = 0; ADCSequenceDisable(ADC0_BASE, 3); result = goertzel(buffer); client.println(result); ADCSequenceEnable(ADC0_BASE, 3); } ADCSequenceDataGet(ADC0_BASE, 3, (buffer + bufferIndex)); bufferIndex++; } void setupADC(void) { SysCtlClockSet(SYSCTL_SYSDIV_2_5 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_25MHZ); //Enable ADC0 and timer SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB); SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0); //pin for testing //GPIOPinTypeGPIOOutput(GPIO_PORTB_BASE, GPIO_PIN_0); TimerConfigure(TIMER0_BASE, TIMER_CFG_PERIODIC); TimerClockSourceSet(TIMER0_BASE, TIMER_CLOCK_SYSTEM); //625 - 40 kHz sampling rate TimerLoadSet(TIMER0_BASE, TIMER_B, 625); TimerControlTrigger(TIMER0_BASE, TIMER_B, true); //Disable before configuring ADCSequenceDisable(ADC0_BASE, 3); ADCSequenceConfigure(ADC0_BASE, 3, ADC_TRIGGER_TIMER, 0); ADCSequenceStepConfigure(ADC0_BASE, 3, 0, ADC_CTL_CH0 | ADC_CTL_IE | ADC_CTL_END); //sequencer 3 on PE3 SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE); //PE3 ADC pin GPIOPinTypeADC(GPIO_PORTE_BASE, GPIO_PIN_3); IntRegister(INT_ADC0SS3, ADC3IntHandler); ADCIntRegister(ADC0_BASE, 3, ADC3IntHandler); IntMasterEnable(); IntEnable(INT_ADC0SS3); ADCIntEnable(ADC0_BASE, 3); ADCSequenceEnable(ADC0_BASE, 3); SysCtlDelay(10); TimerEnable(TIMER0_BASE, TIMER_B); //Timer A conflicts with SPI of wifi module ADCIntClear(ADC0_BASE, 3); } void setup() { setupADC(); WiFi.begin(ssid, password); while ( WiFi.status() != WL_CONNECTED) { delay(300); } while (WiFi.localIP() == INADDR_NONE) { delay(300); } uint8_t tries = 0; while (client.connect(server, port) == false) { if (tries++ > 100) { while(1); } delay(100); } delay(1000); } void loop() { //client.println("hello"); } Thank you!
  2. Hello everyone !! I have a small problem and it is the following: First I'm simulating sensors with approximate random's values, and I need to upload this data to pubnub and freeboard as monitoring platform, the problem I have is that in pubnub I find the values updated in real time, What happens, is that when I upload to freeboard are not updated, they take a fixed number. I am hesitating in the way of storing them, I think it is not appropriate. I have the well-linked accounts between pubnub and freeboard. Greetings. MR this is my code !! #include <SPI.h> #include <WiFi.h> #include "PubNub.h" #include <aJSON.h> #define NUM_CHANNELS 4 // How many analog channels do you want to read double randomDouble(double min, double max, int numCasas){ long _min = min * pow(10, numCasas) + 0.1; long _max = max * pow(10, numCasas) + 0.1; return (double) random(_min, _max) / pow(10, numCasas) ; } int sn=0; char pubkey[] = "***"; char subkey[] = "***"; char channel[] ="***"; char uuid[] = "***"; // your network name also called SSID char ssid[] = "***"; // your network password char password[] = "***"; static int keyIndex = 0; void setup() { Serial.begin(115200); randomSeed(analogRead(0)); PubNub.begin(pubkey, subkey); PubNub.set_uuid(uuid); Serial.println("PubNub set up"); } void loop() { double Freq = randomDouble(10.71, 10.79, 2)+1839755.00; double voltage_1 = randomDouble(0.82, 0.88, 2); double temperature = randomDouble(18.30, 20.00, 2); double vol = randomDouble(3.10, 3.29, 2); double data[] = {Freq, voltage_1, temperature, vol}; PubSubClient *client; // create JSON objects aJsonObject *msg, *dataReadings; msg = aJson.createObject(); aJson.addItemToObject(msg, "DataReading", dataReadings = aJson.createObject()); // get latest sensor values then add to JSON message for (int i = 0; i < NUM_CHANNELS; i++) { String Channel = String(data[i]); char charBuf[Channel.length()+1]; Channel.toCharArray(charBuf, Channel.length()+1); double Values = data[i]; aJson.addNumberToObject(dataReadings, charBuf, Values); } // convert JSON object into char array, then delete JSON object char *json_String = aJson.print(msg); aJson.deleteItem(msg); // publish JSON formatted char array to PubNub Serial.print("publishing a message: "); Serial.println(json_String); PubNub.publish(channel, json_String); free(json_String); delay(500); }
  3. I am using CC3100 and BOOSTXL-SENSHUB alongwith TM4C123GXL launchpad to build a project that senses the temperature and posts it to some server. Is there any energia library or sample code for BOOSTXL-SENSHUB sensor hub pack?
  4. Hello, I have recently bought cc3100 booster pack to use with msp432 and energia. I connected the boosterpack with the launchpad as shown in the attached pic below. I tried to run the sketch "SimpleWebServerWiFi" , as shown in the tutorial page of energia. I didn't press any switches on the boosterpack and simply connected it with the main board and powered it on and uploaded the example sketch after changing the ssid and password.But the serial monitor outputs nothing and the "http://192.168.1.64/L " page does not load . Please help.
  5. We have developed hardware, open source firmware and a web app, which will allow very rapid creation of IoT applications, aimed at beginners and experts alike. We use a Wi-Fi master, paired with ISM slaves, to allow greater battery life and range for the slaves (though masters can be used on their own). A complete security infrastructure is in place, and a personalised web app is created on set-up. Or you can extend our code, point to your own server or use our API to build your own web or desktop application. Our master is based on CC3100 + MSP5969 + CC110L. We currently supply slaves based on the CC430 and made by PanStamp. Please take a look at www.wifithing.com and our kickstarter campaign. If you want a third party view of what we are trying to do, this article covers it well: SemiAccurate Or look at the blog posted about us on energia.nu. Edward
  6. Hi Everyone, I have made available binaries and source code for an RGB lighting project called LightServer that I thought some of you would be interested in. The best way to see what you can do with LightServer is to view the videos on Vimeo here - https://vimeo.com/album/3015956 No coding experience required to set this up and use. Technical Details LightServer uses the Tiva C LaunchPad and the CC3100 Wi-Fi BoosterPack and a custom BoosterPack (Eagle files included
  7. I just received my CC3100 booster and I am having some trouble with it. I am not familiar with the networking stuff, so I am not sure where the problem lies. I have been able to get the web server example working, where I can turn the LP LED on and off through the browser. I am also able to get the NTP time example working. When I try to run the weather example, I get an error value of -161 (No DNS specified) when I get to the GetHostIP function. What is causing this? The code I am using is the getweather from the CC3100 examples. I have not modified anything except my network settings in SL_common.h Thanks
  8. Hi guys, I am working on a project and am in need of a second WiFi booster pack for my MSP430f5529LP. I have been using energia code as a base for my project and it has been working great, but I recently decided I need a second MSP + BoosterPack. Anyways, the TI store doesn't seem to be offering the CC3000 booster pack right now so I am wondering how easy it is to make my cc3000 code compatible with the cc3100 or cc3200 BoosterPack. Does anyone have experience with this upgrade? Thanks for the information.
  9. Hi There, Anyone tried (and succeeded) in getting the CC3100 booster pack up and running with the FR5969 LP? I'm getting compilation errors and it looks like it's running out of RAM when I try to compile the example WiFi programs. Errors are ScanNetworks.cpp.elf section .bss will not fit in region 'ram' "region RAM overflowed by 880bytes" Any thoughts? ~DaveS