User:Digimer: Difference between revisions
Jump to navigation
Jump to search
Line 73: | Line 73: | ||
// Setup the server. | // Setup the server. | ||
Server server = Server( | Server server = Server(port); | ||
void setup() | void setup() | ||
Line 82: | Line 82: | ||
// Start the server listening for connections. | // Start the server listening for connections. | ||
server.begin(); | server.begin(); | ||
// Print what comes in over telnet. | |||
Serial.begin(9600); | |||
Serial.println("Node Assassin: 'Ariel' now listening for orders."); | |||
} | } | ||
Line 89: | Line 93: | ||
if (client) | if (client) | ||
{ | { | ||
char reading = client.read(); | |||
// This is what I am trying to concatenate and to print as a whole line. | |||
Serial.println(reading); | |||
server.write(reading); | |||
} | } | ||
} | } |
Revision as of 04:26, 21 January 2010
Alteeve Wiki :: Digimer |
Me
Digimer <- about me.
This page below is my scratch pad.
Research
- Madi: Look up [1] when you get home!
Main Links
Sample Xen 2-node Cluster Network Map
MW Code Testing
Indent
Pretext
package AN::Tools;
# This is the "root" package that manages the sub modules and controls access
# to their methods.
#
# Dedicated to Leah Kubik who helped me back in the early days of TLE-BU.
#
BEGIN
{
our $VERSION="0.1.001";
}
use strict;
use warnings;
my $THIS_FILE="Tools.pm";
# Setup for UTF-8 mode.
use utf8;
$ENV{'PERL_UNICODE'}=1;
Test while (1) { code... } span.
Code Debugging
#include <Ethernet.h>
// MAC Address; Array of six bytes.
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xEF };
// Arduino IP, netmask and gateway.
byte ip[] = { 192, 168, 1, 66 };
// Netmask defaults to 255.255.255.0.
byte nm[] = { 255, 255, 255, 0 };
// Default gateway defaults to IP with the last octal set to 1.
byte dg[] = { 192, 168, 1, 1 };
// Laptop's IP address that I test connecting to.
byte remote[] = { 192, 168, 1, 105 };
// This is the port that I will listen on.
int port=238;
// Setup the server.
Server server = Server(port);
void setup()
{
// Setup the IP info.
Ethernet.begin(mac, ip, dg, nm);
// Start the server listening for connections.
server.begin();
// Print what comes in over telnet.
Serial.begin(9600);
Serial.println("Node Assassin: 'Ariel' now listening for orders.");
}
void loop()
{
Client client=server.available();
if (client)
{
char reading = client.read();
// This is what I am trying to concatenate and to print as a whole line.
Serial.println(reading);
server.write(reading);
}
}
Any questions, feedback, advice, complaints or meanderings are welcome. | |||
Alteeve's Niche! | Alteeve Enterprise Support | Community Support | |
© 2025 Alteeve. Intelligent Availability® is a registered trademark of Alteeve's Niche! Inc. 1997-2025 | |||
legal stuff: All info is provided "As-Is". Do not use anything here unless you are willing and able to take responsibility for your own actions. |