Hi, I'm pretty new to arduino programming... Does cc3000 use IRQ to signal data packet received?
I'm running some sort of server on wifi with cc3000. However, if just wait for user to connect. Ideally, I would like to run other code with no user is connection to cc3000. Is there a way to do a pin/IRQ check in the main loop to see if cc3000 received some data so I can then process that data, otherwise continue the loop?
Thanks,
Daniel
Arduino Mega with adafruit cc3000 wifi shield trigger event
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 1
- Joined: Wed Jul 09, 2014 6:45 am
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Arduino Mega with adafruit cc3000 wifi shield trigger ev
Have a look at the ChatServer example that comes with the CC3000 library. It does exactly what you're talking about, without resorting to checking pins.
After you create your server instance, you call the server object's available() function, which will return a client object. You can then check the client's available() function to determine whether or not the client has any data available to read.
These are non-blocking functions, so you can go off an do other things if there is no client, or if the client has no data.
After you create your server instance, you call the server object's available() function, which will return a client object. You can then check the client's available() function to determine whether or not the client has any data available to read.
These are non-blocking functions, so you can go off an do other things if there is no client, or if the client has no data.
Please be positive and constructive with your questions and comments.