Jump to content


ARDUINO UNO R3 + CuHead Wifi Shield

  • Please log in to reply
1 reply to this topic

#1 Daniel Freire

Daniel Freire


  • Members
  • Pip
  • 1 posts
  • LocationManaus

Posted 15 March 2014 - 10:15 PM

Good Nigth all,


I am developing a project with the ARDUINO UNO R3 together CuHead Wifi Shield V2.  I am having difficulty to how to use the correct functions to read datas via Socket Application from my Mobile Android App. I have been successfully run the exemplo code SocketApp.h downloaded together WiShield Library following this link -> https://github.com/l...BasedWiFiShield . But I don`t know how to manipulate the functions inside the psock.h file. I believe that I have to use the PSOCK_READBUF() function, but I need help to use it. 
In practice I need that the Arduino implements this simply function: After received the data, string data, from my Android SocketApp, it can uses a IF condition, IF(Data) make do (Liga Led) . So, I need to know manipulate any function to read this data.

Please anybody can help me? If possible please send me a exemplo code to manipulate this function or bufer :D


Remark: After downloaded the WiShield Library that above link, it is necessary to unzip library inside the ARDUINO Libraries folder created at the time of installation ARDUINO. Exemplo: C:\Program Files (x86)\Arduino\libraries and after this you can open socket exemplo code in ARDUINO IDE as bellow:

Click in File>Exemples>WishieldLibrarie>SocketApp



Following below the part code that handle connection in SocketApp exemplo code.

All socket functions is inside the psock.h file. 


static int handle_connection(struct socket_app_state *s)
  PSOCK_SEND_STR(&s->p, "Hello. What is you name?\n");
  PSOCK_READTO(&s->p, '\n');
  PSOCK_SEND_STR(&s->p, "Hello ");
  PSOCK_SEND_STR(&s->p, s->inputbuffer);
  memset(s->inputbuffer, 0x00, sizeof(s->inputbuffer));



Attached Files

  • carpinteyrolkh likes this

#2 chain


    Advanced Member

  • Members
  • PipPipPip
  • 756 posts

Posted 17 March 2014 - 12:48 AM

Please refer to http://learn.linkspr...ad-wifi-shield/

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users