Page 1 of 1

TCP Input node question

PostPosted: Wed Jan 05, 2011 6:48 pm
by alverman
Good evening.
I wish I could use the data (numeric only) that I send from an external device and are displayed in the output node of the TCP input to control a fader.

Is there a way?

Thanks, Alberto

Re: TCP Input node question

PostPosted: Thu Jan 06, 2011 12:12 am
by alverman
Solved !!

Re: TCP Input node question

PostPosted: Fri Jan 07, 2011 11:53 am
by Daniel Kaminski
Cool. Please share what you did, so that other users can profit from your learnings.

Thanks
Daniel

Re: TCP Input node question

PostPosted: Fri Jan 07, 2011 12:44 pm
by alverman
In this mode :)

But i Have a problem!!
I created a hardware project.
Basically I want to create an event in the box using wire potentiometers 10 laps.
For now, the 10-bit ADC of my hardware (Arduino) allows me only a variation of 1024 values, but seems to work.
Applying the change in the x-axis of the layer to move right and left position of the wall.
When I have a value in increasing the value of x grows very fluid while the value of x decreases when x goes in spurts.
Someone who can help me with this.

Below is the code that I made for the control:
Code: Select all
/*
 * Ethernet shield attached to pins 10, 11, 12, 13
 created 06 Gen 2011
 by Alberto Cauzzi
 */

#include <SPI.h>
#include <Ethernet.h>

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = {  0x90, 0xA2, 0xDA, 0x00, 0x08, 0xE6 };
byte ip[] = { 192,168,1,182 };
byte server[] = { 192,168,1,181 }; // Pandora's box

// Initialize the Ethernet client library
// with the IP address and port of the server
Client client(server, 8084);

void setup() {
  // start the Ethernet connection:
  Ethernet.begin(mac, ip);
  // start the serial library:
  Serial.begin(9600);
  // give the Ethernet shield a second to initialize:
  delay(1000);
  Serial.println("connecting...");

  // if you get a connection, report back via serial:
  if (client.connect()) {
    Serial.println("connected");
    // Make a HTTP request:
    client.println("GET /search?q=arduino HTTP/1.0");
    client.println();
  }
  else {
    // if you didn't get a connection to the server:
    Serial.println("connection failed");
  }
}

void loop()
{
int valoreA= analogRead(1);
delay(125);
      client.print(valoreA);
      Serial.println(valoreA);
  // if the server's disconnected, stop the client:
  if (!client.connected()) {
    Serial.println();
    Serial.println("disconnecting.");
    client.stop();
  }
}


ADC comes a constant value but a value fluctuating WD law down and that's why I added knots and trigger Dybanic flloor.
With these nodes improves a little but is not the solution

I hope someone can help me.
Alberto

Re: TCP Input node question

PostPosted: Sat Jan 08, 2011 11:58 pm
by alverman
Arduino work very very fine with Pandora's without encoders but simple two wire potentiometers :)
For the trackball I use an encoder of an old mouse

I am ready to build my event in the box !! :P

I use a range node because now I have a 10 Bit ADC, and have only 1024 position.
When connect new ADC 16 Bit, delete range node and the move linearity is much better.
This is my WD for control of the 2 movable partitions.