EthernetUdp

Hello All, I have been working on a art-net pixel node set up... as linked here--> http://www.deskontrol.net/blog/arduino-based-artnet-node-for-led-pixels/comment-page-4/#comment-649

When I attempt to verify the sketch, I get an error message explaining that "the Udp class has been renamed to EthernetUdp. So i tried to import the ethernetudp library and change evry instance of udp to ethernet udp. When I do this i get an error msg explaining that ethernetudp was "not declared in this scope"

I am quite new at this an know it must be something simple, any help will be greatly appreciated

I am quite new at this an know it must be something simple

Yes, it is.

any help will be greatly appreciated

[u]After[/u] you post your modified code.

ok thanks…
here is the part of the sketch that seems to be the issue, let me know if i should post more of the sketch

// subnet mask needed because art-net uses ‘A’ type network (255.0.0.0), ethernet library defaults to 255.255.255.0
Ethernet.begin(ArtNode.mac, ArtNode.localIp, ArtNode.gateway, ArtNode.subnetMask);
Udp.begin(ArtNode.localPort);

let me know if i should post more of the sketch

Of course you should. ALL of it, to be exact.

So i tried to import the ethernetudp library and change evry instance of udp to ethernet udp.

One does not import files in C++. One includes them.

Is this one of the instances of Udp that you changed?

 Udp.begin(ArtNode.localPort);

If so, it appears that you forgot to save your changes.

I copied the original sketch that i downloaded and not the one that i made changes too…
here it is

#include <SPI.h> // needed for Arduino versions later than 0018
#include <Ethernet.h>
#include <Udp.h> // UDP library from: bjoern@cs.stanford.edu 12/30/2008
#include <FastSPI_LED.h>
#include “artnet_node.h”
#include “common.h” // headers from libartnet
#include “packets.h” // headers from libartnet, striped version

#define USE_UNIVERSE_0
#define USE_UNIVERSE_1

uint8_t factory_mac [6] = { 1, 2, 3, 0, 0, 20}; // the mac address of node
uint8_t factory_localIp [4] = { 2, 0, 0, 20}; // the IP address of node
uint8_t factory_broadcastIp [4] = { 2, 255, 255, 255}; // broadcast IP address
uint8_t factory_gateway [4] = { 2, 0, 0, 0}; // gateway IP address (use ip address of controller)
uint8_t factory_subnetMask [4] = { 255, 0, 0, 0}; // network mask (art-net use ‘A’ network type)

uint8_t factory_swin [4] = { 0, 1, 2, 3};
uint8_t factory_swout [4] = { 0, 1, 2, 3};

uint8_t factory_shortname [ARTNET_SHORT_NAME_LENGTH];
uint8_t factory_longname [ARTNET_LONG_NAME_LENGTH];

uint16_t size1, size2;

// if you have more than 1 node and need to change addresses, change here node->sub = x
// default value 0 you have output universes addressed as 0x00, 0x01, 0x02, 0x03
// change value to 1 and you have output universes addressed as 0x10, 0x11, 0x12, 0x13
// is a good idea implement a switch for change subnet address.
uint8_t factory_subnet = 0;

artnet_node_t ArtNode;
artnet_reply_t ArtPollReply;
//artnet_ipprog_reply_t ArtIpprogReply; // not implemented yet
artnet_packet_type_t packet_type;

#if defined(AVR_ATmega1280) || defined(AVR_ATmega2560)
const int MAX_BUFFER_UDP = 1650;
#define NUM_LEDS 340
#elif defined(AVR_ATmega328P) || defined(AVR_ATmega168)
const int MAX_BUFFER_UDP = 550;
#define NUM_LEDS 170
#endif

volatile uint8_t packetBuffer [MAX_BUFFER_UDP]; //buffer to store incoming data

struct CRGB { unsigned char r; unsigned char g; unsigned char b; };
struct CRGB *leds;

#define PIN 4 // Arduino output pin to data input on pixels or digital led strips

void setup()
{
sprintf((char *)factory_shortname, “Pixel Node\0”);
sprintf((char *)factory_longname, “LED Pixel Node v1.0 (c)2012 Toni Merino www.deskontrol.net\0”);

fill_art_node (&ArtNode);

#if defined(AVR_ATmega1280) || defined(AVR_ATmega2560)
ArtNode.numbports = 2; // number of universes
#elif defined(AVR_ATmega328P) || defined(AVR_ATmega168)
ArtNode.numbports = 1;
#endif

fill_art_poll_reply (&ArtPollReply, &ArtNode);
//fill_art_ipprog_reply (&ArtIpprogReply, &ArtNode);

// subnet mask needed because art-net uses ‘A’ type network (255.0.0.0), ethernet library defaults to 255.255.255.0
Ethernet.begin(ArtNode.mac, ArtNode.localIp, ArtNode.gateway, ArtNode.subnetMask);
Udp.begin(ArtNode.localPort);

Ah yes…include is what i meant
I did try both simply renaming the udp.h as well as including a new ethernetUdp library

Im not sure what to try next?

I did try both simply renaming the udp.h

Why? The error message was telling you to replace the Udp class with EthernetUdp. It did not tell you to rename Udp to SallyJoeAndBob or EthernetUdp or TwoWeeksFromTomorrow.

as well as including a new ethernetUdp library

That is not at all obvious. I still see #include <Udp.h> and Udp.begin().

Where is the code you ended up with?