User:Digimer: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
= Code Dump = | = Code Dump = | ||
== AVR from CLI == | |||
<source lang="bash"> | |||
perl -MDevice::SerialPort -e 'Device::SerialPort->new("/dev/ttyUSB0")->pulse_dtr_on(1000)'; \ | |||
./hardware/tools/avrdude -Chardware/tools/avrdude.conf -q -q -pm328p -cstk500v1 -P/dev/ttyUSB0 -b57600 -D -Uflash:w:/home/pekka/sketchbook/Blink2/applet/Blink2.hex; | |||
</source> | |||
== Mux/Demux == | |||
<source lang="text"> | <source lang="text"> |
Revision as of 16:30, 8 April 2010
Alteeve Wiki :: Digimer |
Me
Digimer <- about me.
This page below is my scratch pad.
Camping
Code Dump
AVR from CLI
perl -MDevice::SerialPort -e 'Device::SerialPort->new("/dev/ttyUSB0")->pulse_dtr_on(1000)'; \
./hardware/tools/avrdude -Chardware/tools/avrdude.conf -q -q -pm328p -cstk500v1 -P/dev/ttyUSB0 -b57600 -D -Uflash:w:/home/pekka/sketchbook/Blink2/applet/Blink2.hex;
Mux/Demux
<- Outputs ->
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
-+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+- -+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-
S0 ----/ \ S0 ----/ \
S1 ---/ \ S1 ---/ \
S2 --/ \ S2 --/ \
S3 -/ \ S3 -/ \
/_______________________________________________________________________\ /_______________________________________________________________________\
| |
\-----------------------------------. .------------------------------------/
| |
-+---+-
S4 -/ \
/_________\
|
Input
S0-S5 = Source pins
Research
MediaWiki on Debian/PostgreSQL
Misc
- 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. |