Jump to content
Sign in to follow this  
Stunts1337

CC3200 and using SPI while connected to wifi

Recommended Posts

Could someone give me more information on why we cannot include SPI for the cc3200 (as it says at the beginning of every wifi sketch)

#ifndef __CC3200R1M1RGC__
// Do not include SPI for CC3200 LaunchPad
#include <SPI.h>
#endif

I would really like to send a http get request to a server host and program a digital potentiometer based on the values read from the server, but the digital potentiometer uses SPI for data transfer.  As of right now I have taken the values from the server and filtered out the data to the few variables I need to use, and that loops every 10 seconds.  At this point I would like to program the digital potentiometer based on the values read from the server, but it doesn't seem to work.  I do also have the digital potentiometer working on its own if it is not in a wifi sketch.

 

Is there anyway to work around this and accomplish this goal, or could anyone link me to some more information on this subject?

 

Thanks

 

Edit: getting closer to having this work, but if you have anymore insight around this subject feel free to post it, I would like to know everything and anything regarding this topic.

Share this post


Link to post
Share on other sites

You can include SPI.h for CC3200 apps. That line is in the examples because SPI.h isn't strictly necessary to enable WiFi support like it is on CC3100 examples for the MSP430 and Tiva. (The CC3200 WiFi examples are an exact copy of the CC3100 WiFi examples FYI).

Share this post


Link to post
Share on other sites

You can include SPI.h for CC3200 apps. That line is in the examples because SPI.h isn't strictly necessary to enable WiFi support like it is on CC3100 examples for the MSP430 and Tiva. (The CC3200 WiFi examples are an exact copy of the CC3100 WiFi examples FYI).

Thank you that is good to know.  I took a break to eat and relax for a bit, turns out I was very dumb in forgetting to assign the pinmode as output for the CS pin.  Sometimes you just make those dumb mistakes that cost you lots of annoyance.  

 

Not in the clear quite yet, but I do have a program working which reads the data from the server, then disconnects from WiFi and enters a loop using the digital potentiometer, so it looks to be a promising start.

 

Thanks again for the clarification.

Share this post


Link to post
Share on other sites

While you're at it, you might want to try unzipping this "service pack" .zip file from within your Energia install directory, it brings the WiFi libraries up to the current github master (fixes some WiFi bugs and adds some features):

simplelinkwifi_energia13_servicepack_10222014.zip

 

Shut down Energia before unzipping it.

 

In particular you may find that pumping a lot of data really fast or using lots of single-byte writes (like what .print() and .println() do under the hood for printing integers) through a WiFiClient outbound connection causes aborted connection/lost data without this "patch".

Share this post


Link to post
Share on other sites

While you're at it, you might want to try unzipping this "service pack" .zip file from within your Energia install directory, it brings the WiFi libraries up to the current github master (fixes some WiFi bugs and adds some features):

attachicon.gifsimplelinkwifi_energia13_servicepack_10222014.zip

 

Shut down Energia before unzipping it.

 

In particular you may find that pumping a lot of data really fast or using lots of single-byte writes (like what .print() and .println() do under the hood for printing integers) through a WiFiClient outbound connection causes aborted connection/lost data without this "patch".

 

do you know if the current Energia 0101E0013 for Windows includes this patch already?

 

Thanks,

val

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...