The arduino has quite a few pinouts  for a user to take advantage of. as seen in the following picture. that is not even including the ethernet addon on board.

More details at: http://arduino.cc/en/Main/ArduinoBoardUno

Per Radio Shack the price of an Ardiuno is $34.99. The price of an ethernet shield for the arduino is $44. By the time you add tax, you are getting close to one hundred dollars. If you just want to learn electronics, an old pc will give you a lot of the same ports. In most cases you might have one lying around or you can get a hand me down for free.

PC pinouts:

Parallel port:

Pin No (DB25) Pin No (36 pin) Signal name Direction Register – bit Inverted
1 1 Strobe In/Out Control-0 Yes
2 2 Data0 Out Data-0 No
3 3 Data1 Out Data-1 No
4 4 Data2 Out Data-2 No
5 5 Data3 Out Data-3 No
6 6 Data4 Out Data-4 No
7 7 Data5 Out Data-5 No
8 8 Data6 Out Data-6 No
9 9 Data7 Out Data-7 No
10 10 Ack In Status-6 No
11 11 Busy In Status-7 Yes
12 12 Paper-Out In Status-5 No
13 13 Select In Status-4 No
14 14 Linefeed In/Out Control-1 Yes
15 32 Error In Status-3 No
16 31 Reset In/Out Control-2 No
17 36 Select-Printer In/Out Control-3 Yes
18-25 19-30,33,17,16 Ground


PWM can be achieved through software on the data line.

Serial port.: (9 pin is most more common)

DB-9 Pin Signal Name Dir Description IDC internal
(newer)*
IDC internal
(older)*
1 CD <-- Carrier Detect 1 1
2 RXD <-- Receive Data 2 3
3 TXD --> Transmit Data 3 5
4 DTR --> Data Terminal Ready 4 7
5 GND --- System Ground 5 9
6 DSR <-- Data Set Ready 6 2
7 RTS --> Request to Send 7 4
8 CTS <-- Clear to Send 8 6
9 RI <-- Ring Indicator 9 8

Joystick port:

Pin Name Dir Description
1 +5V --> +5 VDC
2 /B1 <-- Button 1
3 X1 <-- Joystick 1 – X
4 GND --- Ground (for switch 1)
5 GND --- Ground (for switch 2)
6 Y1 <-- Joystick 1 – Y
7 /B2 <-- Button 2
8 +5V --> +5 VDC
9 +5V --> +5 VDC
10 /B4 <-- Button 4
11 X2 <-- Joystick 2 – X
12 GND --- Ground (for switch 3,4)
13 Y2 <-- Joystick 2 – Y
14 /B3 <-- Button 3
15 +5V --> +5 VDC or N/C

That gives you 4 analogue and 4 additional digital input ports.

Vga: (ones supporting i2c)

Guess what I am getting at is there is a lot of opportunity to salvage old pc’s so they do not have to be recycled.

————————————————————————-

Linux Horizon

Linux Advanced Routing Mini HOWTO

Hacker Emblem

This page is a small HOWTO about the advanced linux routing…

First of all let me tell you where you can find the best source of information about the advanced routing under Linux. Most of you probably know or heard about the Linux Advanced Routing & Traffic Control site. There you can see a very comprehensive source of knowledge based not only on documentation but by easy to understand examples…

Credits: Linux Advanced Routing & Traffic Control, Thea

Ok, then…
This page will show you how to set a linux box to use 2 different ISPs on the same time…

First example:
Goal: To route packets that came from 4 network to different ISPs

Let’s presume that you have two ISPs. In the following examples I’ll use RDS and ASTRAL (two large ISPs from my country)
For the ASCII art and lynx console browser fans I’ll use this kind of chart:

                                                                   ________
                                           +-------------+        /
                                           |    ISP 1    |       /
                             +-------------+    (RDS)    +------+
                             |             | gw 10.1.1.1 |     /
                      +------+-------+     +-------------+    / 
+----------------+    |     eth1     |                       /
|                |    |              |                      |
| Local networks +----+ Linux router |                      |  Internet cloud
|                |    |              |                      |
+----------------+    |     eth2     |                       \
                      +------+-------+     +-------------+    \
                             |             |    ISP 2    |     \
                             +-------------+  (ASTRAL)   +------+
                                           | gw 10.8.8.1 |       \
                                           +-------------+        \________

We will work only on Linux router box. From the root prompter do:

echo 1 RDS >> /etc/iproute2/rt_tables
echo 2 ASTRAL >> /etc/iproute2/rt_tables

The /etc/iproute2/rt_tables content after previous commands:

#
# reserved values
#
255     local
254     main
253     default
0       unspec
#
# local
#
#1      inr.ruhep
1 RDS
2 ASTRAL

Now we have three routing tables as follows: RDS table, ASTRAL table and the main table…
Let’s fill up every table with the defaults routes:

The next step is to have some routing rules and routes:

For the RDS table:

ip route add default via 10.1.1.1 dev eth1 table RDS
ip rule add from 10.11.11.0/24 table RDS
ip rule add from 10.12.12.0/24 table RDS

For the ASTRAL table:

ip route add default via 10.8.8.1 dev eth2 table ASTRAL
ip rule add from 10.22.22.0/24 table ASTRAL
ip rule add from 10.33.33.0/24 table ASTRAL

To see the routing tables:

ip route show table ASTRAL
ip route show table RDS
ip route show table main 	# it's the same as "route -n" but in different format...

To see the routing tables:

ip rule show			# all the rule list
ip rule show | grep ASTRAL	# only for ASRAL
ip rule show | grep RDS		# only for RDS

Let me explain the above rules.
The packets that came from the 10.11.11.0/24 and 10.12.12.0/24 networks will go to the RDS routing table and then (because we have a default route) will be passed to the RDS gateway. And similar, the packets that came from the 10.22.22.0/24 and 10.33.33.0/24 network will go to the ASTRAL gateway…
What is happening with the packets that came from other networks that are not shown in the above rules? Well, they just simply go to main routing table and follow the routing rules that reside there… If you want to block them to go to internet just delete the default route from the main table… (of course, doing that your router can not longer go to interent).

Second example:
Goal: To route the packets having the destination port 22/tcp to the RDS and 80/tcp to the ASTRAL (no matter what network generates them).
This example it is almost the same as the first one except that we will use iptables to mark the packets.

Same chart…

                                                                   ________
                                           +-------------+        /
                                           |    ISP 1    |       /
                             +-------------+    (RDS)    +------+
                             |             | gw 10.1.1.1 |     /
                      +------+-------+     +-------------+    / 
+----------------+    |     eth1     |                       /
|                |    |              |                      |
| Local networks +----+ Linux router |                      |  Internet cloud
|                |    |              |                      |
+----------------+    |     eth2     |                       \
                      +------+-------+     +-------------+    \
                             |             |    ISP 2    |     \
                             +-------------+  (ASTRAL)   +------+
                                           | gw 10.8.8.1 |       \
                                           +-------------+        \________

Same /etc/iproute2/rt_tables content:

#
# reserved values
#
255     local
254     main
253     default
0       unspec
#
# local
#
#1      inr.ruhep
1 RDS
2 ASTRAL

Before you start check your iptables configuration. I strongly recommend to read about iptables if you are unsure about what you will doing next.
For more documentation go to iptables home page or you can download a good documentation from this site (Security & Privacy Section) or directly from here.

To mark the packets that have the 22 and 80 as destination port we will use the MANGLE table…

iptables -A PREROUTING -t mangle -i eth0 -p tcp --dport 22 -j MARK --set-mark 1
iptables -A PREROUTING -t mangle -i eth0 -p tcp --dprot 80 -j MARK --set-mark 2

For the RDS table:

ip route add default via 10.1.1.1 dev eth1 table RDS	# the same like in the first example

For the ASTRAL table:

ip route add default via 10.8.8.1 dev eth2 table ASTRAL	# the same like in the first example

The next step is to have some routing rules based by the marked packets:

For the RDS:

ip rule add from all fwmark 1 table RDS

For the ASTRAL:

ip rule add from all fwmark 2 table ASTRAL

You can use the same commands to see the routing tables and rule lists as in the first example.
Now you have a routing solution based by the destination port…

————————————————————

Easy home made wifi reflector that should boost power.

More info at: http://www.instructables.com/id/Ehow-wifi-booster/

—————————————————————————–
That was a quick game. Zero seconds. Talk about software glitches. Took a bit more than that.

————————————————————————–
First Arduino project:
—————————————————————————
Strombolli biscuit (maybe a little too much sauce).
Good day.
Advertisements