Recent Updates Page 2 RSS Hide threads | Keyboard Shortcuts

  • Send OSC messages from Unity

    Ellen 11:30 on January 31, 2013 | 3 Permalink | Reply

    Many people wrote to me wondering how to send data from Unity through OSC back to Processing and other applications. Well the answer is simple, write the following code:

    oscListener.oscHandler.Send(Osc.StringToOscMessage(”/Your event name”));

  • Real time blend 2 textures in Unity

    Ellen 08:40 on September 6, 2012 | 11 Permalink | Reply
    Tags: , shaders,

    I had a hard time changing the texture of a game object in real-time where I tried out a movie fading between textures and using Lerp on the material. I wanted it to be dynamic and just be able to pass an argument to my script defining which texture to animate to. Many game objects had different shaders so it didn’t work just to Lerp the current material. So I create custom shaders for different objects that contained 2 textures “_MainTex” and “_Texture2″. I also added the blend option the the shader order to be able to control the blend of the texture from outside. Just adding the shader you can change the blend slider to see the result.

    See example of one diffuse shader with normal map.

    In my javascript I could then pass in which texture to change to and which one to change from.
    I set the textures I want to change between. These are set in the inspector of athouring environment of Unity and passed to the script.

    var firstTexture:Texture;
    var secondTexture:Texture;
    var thirdTexture:Texture;

    The script starts out with setting the default texture of the chosen game object. The game object could have been passed to the script as well. :-)

    function Start () {
        textureObject = gameObject.Find("myTextureObject");
        textureObject.renderer.material.SetFloat( "_Blend", 1 ); // Setting the current texture to be 100% visible

    The public function changeTexture can be accessed from outside to recieve arguments for new textures. newTexture is used to store the new texture as soon as it is time to animate.

    public function changeTexture(myArg : float) {
      yield WaitForSeconds(0.3);

      if(myArg == 1) {
          newTexture = firstTexture;
      } else if (myArg == 2){
          newTexture = secondTexture;
      } else if (myArg == 3){
          newTexture = thirdTexture;

      textureObject.renderer.material.mainTexture = newTexture;
      triggerChange = true;

    In the update function the script always checks if it should change to a new texture. If changeTexture was called it starts blending to the new texture. At the end it sets the old texture to the new one and resets the blend:

    function Update () {
         if(triggerChange == true) {
              changeCount = changeCount - 0.05;

              textureObject.renderer.material.SetFloat( "_Blend", changeCount );
              if(changeCount <= 0) {
                   triggerChange = false;
                   changeCount = 1.0;
                   textureObject.renderer.material.SetTexture ("_Texture2", newTexture);
                   textureObject.renderer.material.SetFloat( "_Blend", 1);


    BlendTextures.js is the entire javascript file of the script above.

    To implement this in Unity follow these steps:
    1. Add your script to the scene. Select the textures and normalmap you defined as public variables in BlendTextures.js.
    2. Create a material and choose your custom shader.
    3. Add the material to your game object.


    Read up on how to create your custom shaders in the Unity Documentation.

    • bloodair 06:30 on September 28, 2012 Permalink

      I love you Ellen :D

    • Aurorem 15:49 on November 6, 2012 Permalink

      Thanks! Great script! But how can I affect the material slider in the inspector with a GUI slider?

    • Marco Vidaurre 09:12 on December 23, 2012 Permalink


      Nice shader.

      Is there a shader for iOS or mobile that can do this efficiently?



    • omelchor 13:05 on May 29, 2013 Permalink


    • Ellen 02:05 on November 14, 2013 Permalink

      @Aurorem You can pass the values of your GUI slider into your material script.

    • Ellen 02:05 on November 14, 2013 Permalink

      @Marco I have no idea. This was made with the standalone platform in mind.

    • ikhazen 11:53 on May 14, 2014 Permalink

      this saves my ass :)

    • Robert 23:35 on January 9, 2015 Permalink

      HI there I followed the directions and I’m getting a
      BlendTextures.js.js(36,3): BCE0005: Unknown identifier: ‘yieldWaitForSeconds’.
      and the script has no entry boxes below.

    • Robert 23:41 on January 9, 2015 Permalink

      HI there I followed the directions and I’m getting a
      BlendTextures.js.js(36,3): BCE0005: Unknown identifier: ‘yieldWaitForSeconds’.
      and the script has no entry boxes below.

    • cefaloide 12:02 on March 30, 2015 Permalink

      Thanks for your aportation!

      I get this error on BlendTextures.js:
      Assets/BlendTextures.js(42,3): BCE0005: Unknown identifier: ‘yieldWaitForSeconds’.

      If I comment the “yieldWaitForSeconds” and set “firstTexture”, “secondTexture” and “thirdTexture” to public it works perfectly.

      Thanks a lot!

    • eien 06:34 on June 16, 2015 Permalink


      I don’t know if you’re still looking into this, but there’s been a typo. It’s “yield WaitForSeconds” I’ve had that problem and a space solved it.

  • Unity + Processing Demo

    Ellen 10:11 on July 2, 2012 | 6 Permalink | Reply
    Tags: osc, , ,

    Test your Unity project with the Processing Osc Demo. Send your events through the Processing app and see them appear in the Unity project. There is also a timer in Processing sending events at all time changing the width of a cube in Unity. Download the Unity OSC example here.

    • Jeroen Boumans 20:35 on August 13, 2012 Permalink

      is it also possible to write towards a LED on the arduino board via Unity > Processing? For example if i press a GUI button in unity, a boole will be “true” and so a signal will be written towards processing, that activates the LED.

    • Ellen 07:44 on September 6, 2012 Permalink

      @Jeroen Boumans You can send osc events from Unity with the following code:
      oscListener.oscHandler.Send(Osc.StringToOscMessage(”/Your event name”));

    • Rufael 13:12 on February 11, 2013 Permalink

      Hello Ellen! We are a group of students who plan to use this example for a project. Your example works perfectly between Unity and Processing but we would like to use the Processing-sketch on Android.
      There are some things that are problematic, for example the Serial library for Processing that does not work on Android.
      Do you have any tips on how to go about doing that? To get the Processing Sketch to work on Android so that one can send messages to Unity wirelessly.
      Great work otherwise!
      Mvh Rufael

    • Rufael 00:34 on February 12, 2013 Permalink

      Actually, we figured it out. You just have to tweak the ip-adresses a bit! Thanks anyway!

    • Niels 10:01 on May 15, 2014 Permalink

      Thanks for this Ellen, helped me out a lot.
      For those wondering, the Osc.StringToOscMessage(”/Your event name”); makes typetags out of each chunk of data seperated by a spacing, except for the first (so in this case “event” and “name”).

    • perfectsugar 12:40 on July 6, 2014 Permalink

      Hi, I’m a high school student in Japan and I’m a beginner at programming.
      …I got a trouble now.
      I tried to run this example in Unity and Processing but I failed.
      There’s only error in Unity and it says that:
      Assets/Scripts/OSCController.cs(18,29): error CS1501: No overload for method `Init’ takes `3′ arguments
      How do I correct this error in Unity??
      Could you please tell me how it works ?

  • Heavy duty pull sensors

    Ellen 18:21 on June 25, 2012 | 0 Permalink | Reply
    Tags: , , ,

    Interacting with installations with a long life time we turn to heavy duty sensors that can handle a lot of cycles. The string and pull sensors below can handle more than a million cycles and are built for industrial use. They can also be connected to circuit board like Arduino.

    Check out all the pull sensors and string pots from Celesco. Novotechnik also offers a wide range of pull sensors.

    Check out this Processing and Arduino project by nhw3030 with Celesco string sensors.

  • Unity + Processing + Arduino

    Ellen 10:32 on May 31, 2012 | 18 Permalink | Reply
    Tags: , , , ,

    I did a test connecting Arduino and Unity with the help of Processing and a Open Sound Control library. When I am pushing the Flexi Force sensor the values affect a cube within Unity. To get this setup do the following:

    Load the Standard Firmdata on to your Arduino. Check out a full Arduino + Processing tutorial to get the setup.

    Download the oscP5 processing library and put it in your Processing sketch folder in the folder libraries.

    Initialize oscP5 library and broadcast data to port 12000. The port Unity will listen to.
    Add the remote location to listen to on port 3200. If Unity would broadcast event in this example, the broadcast port would be set to 3200. Initialise Arduino to be used later on.

    oscP5 = new OscP5(this,12000);
      myRemoteLocation = new NetAddress("",3200);
      arduino = new Arduino(this, Arduino.list()[0], 57600);

    In the draw function we read the analoge pin 0 to get sensor values from the Flexi Force sensor. Set the OSC message to flexiforce. Unity will listen to this label. Add the message of the sensor value into the osc message with add method. This method can take numbers, strings and byte data.

    float flexiforceSensor = arduino.analogRead(0);
    OscMessage oscMess = new OscMessage("/flexiforce");

    oscP5.send(oscMess, myRemoteLocation);

    The entire Processing sketch can be seen here.

    In Unity you can import the Osc.cs and UDPPacketIO.cs to broadcast and listen to UDP data.

    Set up the corresponding host and ports in your Unity script.

    public var OSCHost : String = "";
    public var SendToPort : int = 3200;
    public var ListenerPort : int = 12000;

    Import the UDPPacketIO and Osc components and feed in the host and ports. Add your specific label of your osc message and what method to call when receiving this event from Processing.

    var udp : UDPPacketIO = GetComponent("UDPPacketIO");
    udp.init(OSCHost, SendToPort, ListenerPort);
    handler = GetComponent("Osc");
    handler.SetAddressHandler("/flexiforce", AffectObject);

    In the receiving method you can print out the label and message values. In this case the sensor value from the Flexi Force. The cube will change width when getting a new value from Processing.

    public function AffectObject(oscMessage : OscMessage) : void
            Debug.Log("Event name: " + Osc.OscMessageToString(oscMessage));
            Debug.Log("Event data: " + oscMessage.Values[0]);
            var myCube = GameObject.Find("Cube");
            var boxWidth:int = 8 - ( oscMessage.Values[0]);
            myCube.transform.localScale = Vector3(boxWidth,5,5);

    • Pablo 10:46 on June 5, 2012 Permalink

      great tutorial! do you have the entire source code available??

    • Juan 13:27 on June 16, 2012 Permalink

      Hi Ellen,
      As Pablo said: GREAT JOB!
      I’m trying to do the same, can you email me the sorce code?

      Thanks a lot


    • Mikael 02:22 on June 22, 2012 Permalink

      How can I find the Osc.cs and UDPPacketIO.cs for the Unity?

      And yes I expect to have the source code also.

      Thank you,


    • Ellen 16:46 on June 25, 2012 Permalink

      The Osc.cs and UDPPacketIO.cs files are now available for download within the post. I will post the source code to the project shortly!

    • Ellen 18:00 on June 26, 2012 Permalink

      Source code and Processing example can be downloaded from here:

    • Ellen 10:13 on July 2, 2012 Permalink

      Test out the demo of Unity and Processing here:

    • between0and1 19:58 on August 6, 2012 Permalink

      HI, I really like the tutorial and am excited to make it work full through. I’ve got all the processing / arduino bits working, but on moving into Unity I get a null reference exception on the line

      I’m assuming it has to do with the way it is trying to access UDPPacketIO script, but I don’t yet have enough experience to know how to modify this to work properly.
      I’ve downloaded your processing demo and worked on it from there, but still can’t quite get it.

      Thanks for the demo! I’m excited to move forward wit this

    • Ellen 07:42 on September 6, 2012 Permalink

      @between0and1 Which platform are you on? If you run WIndows you need to change a line UDPPacketIO.cs. On Mac you import IO like this: “using System.IO;”. On Windows you need to add .Ports so you import ” System.IO.Ports;”

    • shanshan 23:01 on October 6, 2012 Permalink

      Hi Ellen
      Thank you so much for sharing resources and knowledge! this is amazing!

    • Matthias 10:46 on October 24, 2012 Permalink

      What is this error?

      Exception in thread “Animation Thread” java.lang.IllegalAccessError: tried to access class processing.core.PApplet$RegisteredMethods from class cc.arduino.Arduino$SerialProxy

    • Oliver Jones 00:19 on January 27, 2013 Permalink

      Nice work Ellen! Is it possible to reverse this? So I can send variables from Unity, into Processing?

    • jim 20:52 on August 3, 2013 Permalink

      thanks for the tutorial! I run the processing and it works fine, it is printing the correct “flexiforceSensor” value . but when running Unity3D, the eventName and eventData are empty…..any idea what went wrong?

    • Ellen 02:11 on November 14, 2013 Permalink

      @Jim Please double check the ports you are listening in to. There are helpful applications for that to see what you input and output. When I find the link the the aswome app I used I will post it here!

    • Michael 04:29 on April 16, 2014 Permalink

      Ellen this is great but I’m stumped on the UDPPacketIO.cs issue. I’m on Windows, so
      even after changing adding .Ports to get ” System.IO.Ports;” I still get a NullReference error in Unity. I must have retried this and scoured the code for any issues for an hour. Everything looks fine but I can’t find a solution. I’ve checked all over the net and no answers. Any help is greatly appreciated.

  • Add app to Facebook page

    Ellen 16:46 on May 30, 2012 | 0 Permalink | Reply
    Tags: , Facebook app,

    If you want to add your app to a Facebook page, you will have to do the following.

    1. Prepare your app

    Make sure your have has valid URLs to point to from the little thumbnail in the Facebook page. Add an image that will be displayed. To fit the image into the area on the Facebook page it needs to be 111 x 74 px.


    2. Add the app
    To add the app to the page you need to run the following link:[APP_ID]&next=[PAGE_TAB_URL]

    The app id can be found
    3. Add page tab dialog
    The page tab dialog will show all the pages you have admin permissions to.

  • Notes from Facebook Garage in Stockholm

    Ellen 13:40 on May 26, 2012 | 0 Permalink | Reply
    Tags: ,


    Tagging users
    Application can tag people in updates. Permissions needed.
    The application can add a personal message to the update and also add it after the action was published.

    User generated photos
    It is now possible to post large photos in the news feed even without uploading it to a Facebook album.
    The difference is that the image is uploaded to your own server. The image URL is then passed to the Open Graph together with other optional values like:
    sources – Image URL
    large – If the image should be big (boolean)
    expires_in – How long the post should exist (seconds)
    tags – User ids in array to pass tagged users
    message – Your personal message
    place – Id of Facebook place
    your own actions – Verbs

    Post it to the graph with /me/[namespace_of_app]:your_action

    Download the example application here:
    Example includes single sign in with Facebook iOS SDK.

    Add app from Timeline
    If friends are using a Facebook app and a post appears in your news feed and you don’t have the app, you can install the app in a click of a button. The button on the post says “Add app”.
    To enable it put a URL in Profile URL in application settings.

    Publish past on user timeline
    Post past things on the users timeline
    Button to fill out past timeline

    Map Stories
    Specify long and lat on a page can be added in meta tags. Your post can be associated with a location.

    New Feed Aggregations
    The more traffic a post gets it gets highlighted in the news feed.

    Action links on OG Stories
    Accept Diff – Authenticate the application to display application-functionality in the post:

    offline_access – Depreciated
    Valid for 60 days is the only thing that can be used. As long as the user used your app you have 60 days to access the user.

    publish_stream includes publish_actions by default now.

    iOS Deep Linking
    It is possible to deep link into an iOS app from posts of the mobile Facebook app. If the user doesn’t have the app, the user will be directed to the App Store. After installing it the deep link is active.
    This is not new but it just launched for Android.
    To enabled it just check the box of iOS Native Deeplinking in your Application settings.

    Facebook requests
    Facebook requests from Facebook applications can be sent directly to the iOS device linking the user directly to your native iOS app with Facebook integration.

    App Center
    Facebook launched the App Center where all Facebook apps are shown in an App Store-like matter. The apps will show screenshots and rating from users.

  • Geek Girl Meetup in London

    Ellen 15:33 on April 29, 2012 | 0 Permalink | Reply
    Tags: , Geek Girl Meetup 2012, geekgirl,

    Spending the day at Geek Girl Meetup in London. Talked about The Sound of Football and my Arduino projects.

    In the Arduino session I presented my Depressed Shoe Shelf, the bend sensing belt Bad Posture, how to control electronics from the internet using Processing.


  • Arduino library for LED Message Display

    Ellen 18:53 on April 15, 2012 | 17 Permalink | Reply
    Tags: , Arduino library, , LED

    Making life a lot easier I wrote an Arduino library that takes care of converting strings and calculating the checksum of all commands sent to the LED Message Display. Compared to the first example of sending text to the display the library can send commands of how long the text should display, how to be animated in and out and display European characters. All included in the BockiMessageBoard library on Github.


    The code below shows how to initiate and send messages:

    #include <BockiMessageBoard.h>

    BockiMessageBoard messageBoard = BockiMessageBoard(0); // 0 is the Id of your message board

    void setup {
          // Configure the display before sending the text.
          int displayTime = 0.5; // Input 0.5 sec or 1 to 25 seconds

    void loop {
          String euroChars = "Testing with European characters <U45><U44><U76><U65><U64><U61>";

    The library generate serial data to the LED Message Display with this setup:


    <ID00> - The id of the message board.
    <L1> - Line number
    <PA> - Page id
    <FE> - How the text will appear. Scrolling, twinkeling, snowing…
    <MA> -
    <WC> - Waiting time. How long to display text.
    <FD> - How the text will disappear. Scrolling, twinkeling, snowing…
    MESSAGE - The message text to be displayed
    CHECKSUM - Hex value calculated on all tag sabove.
    <E> - End of data.

    The circuit uses a RJ14 cable to transfer the serial data to the display board:

    • Nelson 01:41 on June 25, 2012 Permalink

      Dear Ellen:
      Loved this project ! CONGRATULATIONS.
      I wonder how did you get the communication protocol?
      It happened to me having a couple of identical Displays with different protocols, all of the from China same format and features.
      Can you share with me the protocol of this particular Display?
      Thank you so much.

    • Led Writing Board 08:21 on August 13, 2012 Permalink

      This is the nice blog . There are many information of led writing board if you want get more information and uses of led boards then visit Led writing Board

    • Mostafa Hamdy 04:44 on January 22, 2013 Permalink

      i like this project very much & please i have some questions :

      1- can i define where the message i sent it will appear in the led display ?
      2- can i show two different message in the same time ?
      3- can i use it like LCD arduino libirary ( first set cursor then print message and clear it when i need )
      4- if you have video for this project after implementation can you send to me
      Thanks :)

    • Mostafa Hamdy 05:33 on January 22, 2013 Permalink

      5- can i print or show variable value in this libirary
      messageBoard.displayMessage(PAGE_A,”My message!”);
      i need to print variable x can i do this
      messageBoard.displayMessage(PAGE_A, x);

    • Davy 10:16 on June 3, 2013 Permalink

      I used one these and this library. The one I purchased in the UK from Maplin had an RS232 interface – so I had to use a mini TTL to RS232 converter. I added colour as well which is just an additional . This is particularity good. Thanks for the lib – works well and to that Erasmus lad who figured out the checksum…

    • antonis 09:22 on July 11, 2013 Permalink

      i wanted to know how you connect TTL to arduino?
      Which pins on arduino you used?

    • mike 21:17 on September 29, 2013 Permalink

      Anyone know of the Maplin code of the LED display used by Davy?

    • Antonio 17:49 on October 21, 2013 Permalink

      Hi Ellen, can activated message with and external switch, I need to have around six different messages activated independently by a six switches.


    • John 16:50 on December 26, 2013 Permalink


      i have an arduino and the same led display, but i can’t get the code working, i dont now of i am missing some files or something.
      can you help me?

    • Morris 11:51 on March 3, 2014 Permalink

      Hi Ellen,
      Is the AM07231H11 (red character only display fromAmplus) supported by your library ?

    • Ellen 22:27 on April 1, 2014 Permalink

      @Morris Yes, the display and code only supports red characters. Depeding on what type of display board you have, you might find the answer in this guide:

      Looks like CX is the color code.

    • Ellen 22:29 on April 1, 2014 Permalink

      @Mostafa Hamdy Yes you can, but it’s a limit of characters supported, only English characters with the code supplied.

    • Kshitija 09:56 on March 27, 2015 Permalink

      What are the hardware used in your project.Im seeing Arduino board,rj 14 and display with adapter,why Arduino eth shield and that connector in between is used where tx rx v and gnd signals are given and from where RJ 14 is given to display?

    • Kshitija 09:56 on March 27, 2015 Permalink

      What are the hardware used in your project?Im seeing Arduino board,rj 14 and display with adapter,why Arduino eth shield and that connector in between is used where tx rx v and gnd signals are given and from where RJ 14 is given to display?

    • Paul Duxbury 11:17 on July 1, 2015 Permalink

      Hello, please can you advise on model of LCD display used. Thanks :)

    • Ellen 11:28 on August 19, 2015 Permalink

      @Paul, I used a model similar to this one They both support the same serial protocol. There are other models ( where each product page link to a pdf of the open protocol. Good luck with your project! :-)

  • Make WiShield work in latest Arduino IDE

    Ellen 17:22 on February 17, 2012 | 33 Permalink | Reply
    Tags: , , wishield

    1. Download the WiShield library that has been optimized and fixed by users:

    2. Rename the folder to WiShield and put it into Arduino_sketch_folder/libraries
    You might notice that just running a sketch with the WiShield library will generate errors like:

    return type specified for ‘virtual void Server::write(uint8_t)’
    clock-arch.c:44:20: error: wiring.h: No such file or directory

    3. In order to get rid of these error you need to change the corresponding names in the following files:

    Replace #include “wiring.h” with #include “Arduino.h”

    Replace #include “WProgram.h” to #include “Arduino.h”

    Replace #include “WProgram.h” to #include “Arduino.h”
    Replace void Server::write(uint8_t.. to be size_t Server::write(uint8_t..

    Replace virtual void write(uint8_t); to virtual size_t write(uint8_t);

    • David 18:21 on February 24, 2012 Permalink

      Great tip!

      However, to make it work with my yellowjacket board, I had to take the regular WiShield github branch. The Wishield_user_contrib branch may have been forked before something was fixed. But I took the newest files from the user_contrib (WiServer.cpp, apps-conf.h, g2100.c and uip.c) to get advantage of their fixes too, and then made your modifications, and it is working fine now!


    • Tommy Thorn 02:09 on March 12, 2012 Permalink

      I wonder why we get a different result. The latest Arduino IDE I see is 1.0. When I installed on my mac and I apply the changes you suggest I get
      In file included from webserver.c:38:
      /Volumes/tommy/Documents/Arduino/libraries/WiShield/webserver.h:43: error: conflicting types for ‘uip_tcp_appstate_t’
      /Volumes/tommy/Documents/Arduino/libraries/WiShield/server.h:65: error: previous declaration of ‘uip_tcp_appstate_t’ was here

      I notice that the Rugged Circuits Version 1.3.1 gives me the same result, so
      what am I missing? Thanks.

    • Tom Ashe 19:40 on March 19, 2012 Permalink

      Tommy… This is what you are missing, if you have not found it already. The errors you are getting are caused by the apps-config.h file. It has a series of #defines that are supposed to be commented out and uncommented for the sketch you want to run.
      The file comes with the APP_WISERVER uncommented. This causes the errors you are getting.
      The fix: comment this out and uncomment APP_WEBSERVER and the errors will disappear. Nothing else is required, if you downloaded 1.3.1 from Rugged Circuits.

    • Pedro 22:13 on March 25, 2012 Permalink

      i have the same issu when i try to compile and example.
      Can anybody tell me what i am doing wrong plz.

    • orcuthe 15:42 on April 2, 2012 Permalink

      Worked fine with Wifi Bee.

      Thanks a lot.

    • Ron 18:33 on April 9, 2012 Permalink

      Same here? all the above changes where done…

      In file included from /Users/dvdrony/Documents/Arduino/libraries/WiShield/request.cpp:32:
      /Users/dvdrony/Documents/Arduino/libraries/WiShield/WiServer.h:198: error: conflicting return type specified for ‘virtual void Server::write(uint8_t)’
      /Users/dvdrony/Desktop/~Arduino/ error: overriding ‘virtual size_t Print::write(uint8_t)’


    • Ellen 15:07 on April 13, 2012 Permalink

      @Ron You need to change the return type to size_t in WiServer.h in order for Print.h do follow the interface.

    • Todd 12:36 on May 6, 2012 Permalink

      Thank you, just what I was looking for.

    • Alexander 10:48 on May 10, 2012 Permalink

      Hi, i’m an Italian Student and i have some problem to compile my first wifi arduino application.

      The ide write this error:

      SimpleServer:15: error: conflicting declaration ‘const prog_char ssid []‘
      config.h:43: error: ’ssid’ has a previous declaration as ‘char ssid []‘

      how i can fix this?

      thanks to all…

    • NelsonConect 01:38 on May 13, 2012 Permalink

      Its work for me, but the wishield with flash dont work.

    • Ellen 08:45 on May 31, 2012 Permalink

      Hi Nelson!

      How is your setup with wishield with flash?

    • Pozza 23:23 on May 31, 2012 Permalink

      I had a similar problem with conflicting declarations. It was due to me having 2 versions of the same file, as the board I used, had it’s own version of the file.

      remove one, and that fixed it for me.

      Hope this helps.

    • Ady 22:31 on June 14, 2012 Permalink

      In file included from D:\download\arduino-0023\libraries\wifilib/apps-conf.h:46,
      from D:\download\arduino-0023\libraries\wifilib/uip-conf.h:141,
      from D:\download\arduino-0023\libraries\wifilib/uipopt.h:104,
      from D:\download\arduino-0023\libraries\wifilib/socketapp.h:41,
      from socketapp.c:46:
      D:\download\arduino-0023\libraries\wifilib/webserver.h:46: error: two or more data types in declaration specifiers

    • Ady 22:31 on June 14, 2012 Permalink

      pls help me!!!

    • matt 16:17 on June 20, 2012 Permalink

      Hi Ellen,

      following the posts on (Ellen 17:22 on February 17, 2012 | 14) and (Tom Ashe 19:40 on March 19, 2012 ), i got the WebServer example to upload and work, :-)

      then i tried to get the TinyREST server to work and started getting:
      TinyREST_mpb20120619b:17: error: conflicting declaration ‘const prog_char ssid []‘
      /Users/matt/Documents/Arduino/libraries/WiShield/config.h:44: error: ’ssid’ has a previous declaration as ‘char ssid []‘

      where are (Pozza 23:23 on May 31, 2012 ) multiple versions hiding?

      i have deleted Arduino 1.0.1 on my Mac and i still get the same errors.

      i went back to the WebServer and it also is giving me the same error now, even though it had uploaded and worked, :-(

      /Applications/ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=101 -I/Applications/ -I/Applications/ -I/Users/matt/Documents/Arduino/libraries/WiShield /tmp/build6266653682354258881.tmp/WebServer_mpb20120617.cpp -o /tmp/build6266653682354258881.tmp/WebServer_mpb20120617.cpp.o
      WebServer_mpb20120617.cpp:19: warning: only initialized variables can be placed into program memory area
      WebServer_mpb20120617:15: error: conflicting declaration ‘const prog_char ssid []‘
      /Users/matt/Documents/Arduino/libraries/WiShield/config.h:44: error: ’ssid’ has a previous declaration as ‘char ssid []‘
      WebServer_mpb20120617.cpp:24: warning: only initialized variables can be placed into program memory area
      WebServer_mpb20120617.cpp:28: warning: only initialized variables can be placed into program memory area
      WebServer_mpb20120617.cpp:49: warning: only initialized variables can be placed into program memory area

    • Youmna 03:21 on June 25, 2012 Permalink


    • Brian Ballsun-Stanton 19:31 on July 11, 2012 Permalink

      Matt, I made, in config.h, char ssid to prog_char, and in the demo, removed the constant.

    • Chrigu 12:53 on October 27, 2012 Permalink

      God thank you soo much Ellen! I spent already hours trying to fix things!

    • Christian 23:00 on November 7, 2012 Permalink

      Hi Ellen, I just got one error now: /Applications/ error: #include expects “FILENAME” or This is pointing on: #include “Arduino.h” which seems strange? Can you pls help?

    • Poledust 20:33 on November 25, 2012 Permalink

      I have made the changes that you have suggested here and it did allow me to load to the mega 2560 but the Wishield 2.0 still will not light up and I cant see the Wishield over wifi. In case I am in the wrong place I am using a Arduino mega 2560 with a Wishield 2.0 I have found several blogs and or sites with so many different solutions to this problem and I have tried all of them and still it doesnt work I dont know much about this stuff to get to deep on my own. I would appriciate any help!

    • liuxy 05:52 on January 19, 2013 Permalink

      help me !!

      void udpapp_init(void)
      uip_ipaddr_t addr;
      struct uip_udp_conn *c;

      uip_ipaddr(&addr, 192,168,1,100);
      c = uip_udp_new(&addr, HTONS(0));
      if(c != NULL) {
      uip_udp_bind(c, HTONS(12344));

      s.state = STATE_INIT;


      udpapp.c: In function ‘udpapp_init’:
      udpapp.c:58: error: dereferencing pointer to incomplete type

    • Dave 06:43 on February 27, 2013 Permalink

      How do I go about opening and modifying these files on a PC (windows 7)?

    • ulka 10:35 on March 8, 2013 Permalink

      I hv made the changes but got following…

      In file included from webclient.c:37:
      C:\Program Files\arduino-1.0.3\libraries\WiShield/webclient.h:106: error: conflicting types for ‘uip_tcp_appstate_t’
      C:\Program Files\arduino-1.0.3\libraries\WiShield/server.h:65: error: previous declaration of ‘uip_tcp_appstate_t’ was here

      plz help..


    • mrjeeves 10:13 on April 10, 2013 Permalink

      To solve the dereferenced pointer issue for the udpapp, in uip-conf.h, change the 0 to a 1:

      #define UIP_CONF_UDP 0


      #define UIP_CONF_UDP 1

      (original thread)

    • GK22 03:57 on November 13, 2013 Permalink

      I am trying to use this with a Mega 2560. I have made all of the changes recommended above, but I still get the following errors. Any thoughts?

    • Walter 05:12 on February 10, 2014 Permalink

      hi there, strange thing, i can connect the wishield to my wireless network, and the SimpleServer sketch compiles (with your suggested changes) and it appears to connect to my wifi… however i cannot reach the ip address via any browser… I’m at a loss… here is the code:

      * A simple sketch that uses WiServer to serve a web page


      // Wireless configuration parameters —————————————-
      unsigned char local_ip[] = {192,168,10,41}; // IP address of WiShield
      unsigned char gateway_ip[] = {192,168,10,1}; // router or gateway IP address
      unsigned char subnet_mask[] = {255,255,255,0}; // subnet mask for the local network
      char ssid[] = {”Sophie2″}; // max 32 bytes
      unsigned char security_type = 3; // 0 – open; 1 – WEP; 2 – WPA; 3 – WPA2

      // WPA/WPA2 passphrase
      const prog_char security_passphrase[] PROGMEM = {”4416651121″}; // max 64 characters

      // WEP 128-bit keys
      prog_uchar wep_keys[] PROGMEM = {
      0×01, 0×10, 0×65, 0×10, 0×20, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, // Key 0
      0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, // Key 1
      0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, // Key 2
      0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00 // Key 3

      // setup the wireless mode; infrastructure – connect to AP; adhoc – connect to another WiFi device
      #define WIRELESS_MODE_INFRA 1
      #define WIRELESS_MODE_ADHOC 2
      unsigned char wireless_mode = WIRELESS_MODE_INFRA;
      unsigned char ssid_len;
      unsigned char security_passphrase_len;
      // End of wireless configuration parameters —————————————-

      // This is our page serving function that generates web pages
      boolean sendMyPage(char* URL) {

      // Check if the requested URL matches “/”
      if (strcmp(URL, “/”) == 0) {
      // Use WiServer’s print and println functions to write out the page content
      WiServer.print(”Hello World!”);

      // URL was recognized
      return true;
      // URL not found
      return false;

      void setup() {
      // Initialize WiServer and have it use the sendMyPage function to serve pages

      // Enable Serial output and ask WiServer to generate log messages (optional)

      void loop(){

      // Run WiServer


    • ontreus 02:06 on March 1, 2015 Permalink

      The corrections are right, but with me so I could compile correctly making changes to files in this link:
      (ontreus – brazil)

    • Saba 09:06 on April 6, 2015 Permalink

      How to create the instance of web server using these libraries??

    • Saba 06:49 on April 7, 2015 Permalink

      I have to create this web server
      #define LISTEN_PORT 8888
      Adafruit_CC3000_Server robotServer(LISTEN_PORT);
      which is created using Aduafruit_cc3000 libraries. but i have to create this using Wishield libraries.

    • B. Jiggetts 00:44 on April 15, 2015 Permalink

      I do not get any errors but it seems I’m still not connected to my wifi network. I need help and I have to present my senior design project next week using this Black Widow.

    • ARUNALU 18:25 on September 5, 2015 Permalink

      Ellen thank you for your advise to replace as arduino.h

compose new post
next post/next comment
previous post/previous comment
show/hide comments
go to top