Code Monkey home page Code Monkey logo

Comments (7)

ntruchsess avatar ntruchsess commented on August 24, 2024

So go ahead, test and report your results. The only issue I can see with this library is its haevy use of String-class. You may easily run out ouf RAM as UIPEthernet requires aprox. 400-500 bytes and just crashes when your Sketch allocates more than available so you override your heap or stacks memory. Sketches running with the original Ethernet-lib (with W5100 based shield) are less susceptible to memory-corruption as the stack runs 100% on the Hardware, so even if you override heap memory chances are good the next call to Server.available() succeeds anyway (no gurantee made as the remainder or your Sketch might hang anyway...)
So I think you should use at least a Mega260 to run this library with UIPEthernet

from arduino_uip.

samehhady avatar samehhady commented on August 24, 2024

Thank you for your reply, I guess we will never know till we actually try it out.
I will try it out and let you guys know how did it go.

from arduino_uip.

samehhady avatar samehhady commented on August 24, 2024

FInally am able to test it now, but am getting this error:

In file included from /Users/Sam/Documents/Arduino/libraries/PusherClient/PusherClient.h:33,
from /Users/Sam/Documents/Arduino/libraries/PusherClient/PusherClient.cpp:25:
/Users/Sam/Documents/Arduino/libraries/PusherClient/WebSocketClient.h:49: error: 'EthernetClient' does not name a type

Any idea whats the reason ?

from arduino_uip.

ntruchsess avatar ntruchsess commented on August 24, 2024

UIPEthernet.h is not included (maybe it's not resolved). If you are using Arduino 1.5.x it's most likely that the library-files are not in correct location, so you might check using Arduino 1.0.5. (I do not support Arduino 1.5.x out of the box yet as the 1.5.x library-specification is not stable yet). To see what is included and from which directories you can switch on debugging-output for compilation in Arduino setting.

Don't forget you have to include UIPEthernet.h in the sketch itself. Due to the way the Arduino-IDE works including it indirectly from the PusherClient-lib itself is not sufficient.

That is just gessing... If you want me to understand what really is going on, please submit complete code to reproduce.

  • Norbert

from arduino_uip.

samehhady avatar samehhady commented on August 24, 2024

Hi ntruchsess, Well I am using Arduino 1.0.4
I am already including the Library files in †he main sketch & in PusherClient ( it was referring to ethernet library )
Let me share the code with you.

You can access the full library from here: https://github.com/krohling/ArduinoPusherClient

What I did is:

#include < Servo.h >
#include < SPI.h >
#include < UIPEthernet.h >
#include < PusherClient.h >

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
PusherClient client;
Servo leftServo;
Servo rightServo;


And in WebSocketClient.h I changed it to:

#ifndef WEBSOCKETCLIENT_H
#define WEBSOCKETCLIENT_H_

#include < string.h >
#include < stdlib.h >
#include < WString.h >
#include < UIPEthernet.h >
#include " Arduino.h"

It didn't work that way, Do I need to include it again else where?

I am using the Robot example in the pusher library, too many lines to post here so i thought it better to share with you the link directly.

Thanks again

from arduino_uip.

rayshobby avatar rayshobby commented on August 24, 2024

I tested ArduinoPusherLibrary with UIPEthernet today. Seems to be working fine. Just make sure you change the #include in WebSocketClient.h to use UIPEthernet.h.

from arduino_uip.

rawouter avatar rawouter commented on August 24, 2024

Unfortunately on an atmega328 I'm quickly running out of program space with both UIPEthernet and the PusherClient lib. A very basic sketch of about 30 lines with one bind() takes 96% of prog mem:

Sketch uses 29,566 bytes (96%) of program storage space. Maximum is 30,720 bytes.

I don't think I'll be able to use these libs together, sadly as using websocket was perfect for integration with other clients than arduino.

from arduino_uip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.