Hi all,
I'm building a little home project with my CC3200 and am in need of assistance. I am new to TI products but have a good background with embedded and small board computers. Here's the big picture.
a.) I have a sensor which gets read by an ADC
and
b.) I am wanting to host a webpage
Right now I have part (a) complete and working as needed. I am confused on what I need to do to complete part b.
To achieve what I have done so far I did the following :
Created a new project and added the code from example getting_started_with_ wlan_station and removed the pinging exercise it does to confirm connect. I then took the ADC reading functionality of the adc example and turned it into a function that I can call from my main(). When I debug my program, it does as expected - connects to my AP, but when I type in it's local IP address on my home network in the browser, I get the SimpleLink Status webpage.
1. Does the getting_started_with_wlan_station example include an httpserver?
1a. If so, how would I be able to use my own webpage that displays a variable of importance within my program in real time? This webserver will strictly live locally so it will not be setup for port forwarding etc.
2. What exactly does osi_start() do? After invoking osi_TaskCreate with my ADC function and debugging it, it only executes it once. Or is the processor actually executing my code and I just can't see it?
To explain this more, I have posted some code to help make this question more clear.
void main(void) { //celsiusTemp = 0.0; float fahreinheitTemp; fahreinheitTemp = 0.0; //compilier complains long lRetVal = -1; BoardInit(); PinMuxConfig(); InitTerm(); //fahreinheitTemp = readADC(); // // Configure all 3 LEDs // GPIO_IF_LedConfigure(LED1|LED2|LED3); // switch off all LEDs GPIO_IF_LedOff(MCU_ALL_LED_IND); // // Start the SimpleLink Host // lRetVal = VStartSimpleLinkSpawnTask(SPAWN_TASK_PRIORITY); if(lRetVal < 0) { ERR_PRINT(lRetVal); LOOP_FOREVER(); } // // Start the WlanStationMode task // lRetVal = osi_TaskCreate( WlanStationMode, \ (const signed char*)"Wlan Station Task", \ OSI_STACK_SIZE, NULL, 1, NULL ); if(lRetVal < 0) { ERR_PRINT(lRetVal); LOOP_FOREVER(); } //Start the ADC task lRetVal = osi_TaskCreate( readADC, \ (const signed char*)"Read ADC Task", \ OSI_STACK_SIZE, NULL, 1, NULL ); if(lRetVal < 0) { ERR_PRINT(lRetVal); LOOP_FOREVER(); } // // Start the task scheduler // osi_start(); }
I took the same approach as the examples when creating a task and I want my readADC function to be a task that gets executed periodically. I am going to assume the osi_* class is the TI-RTOS?
If anyone has any knowledge or documentation that could help me achieve my goal I would greatly appreciate it
Thanks all,
JT