Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

V1.0.4

Updated Documentation
  • Loading branch information...
commit 7cf5a9f02bf199fa4b928a250446919ff73babd2 1 parent d99d4ed
@602p authored
View
7 README
@@ -1,12 +1,13 @@
SERPINT
-Serpint is software for controlling the GPIO pins on the Rasperry Pi over a socket or serial port, and that reformattably over a network.
+Serpint is software for controlling the GPIO pins on the Rasperry Pi over a socket or serial port. And to do that over a network in multiple formats.
-It can be used to control the GPIO pins from languages that don't already have a GPIO library, but do for sockets or serial, or from programs that expect a serial port, and to do that from half a world away.
+It can be used to control the GPIO pins from languages that don't already have a GPIO library, but do for sockets or serial, or from programs that expect a serial port, and do that from half a world away.
-Serpint is a toolkit for controlling the GPIO (general pourpouse input/output) pins on a Raspberry PI <raspberrypi.org>. The software is writted in python. The main functions of serpint have to do with controlling the pins as if they were a serial/USB device {1}. It can also be used to controll the GPIO pins over a network. Another use is reformatting the control of the GPIO pins so that the serial device {1} controlling them emulates a different device [say, a scratchboard (example included).] However, as the source code of serpint is avalable (it is not a compiled/compilable application) I hope that many other people will make use of/ make new uses for it.
+Serpint is a toolkit for controlling the GPIO (general purpose input/output) pins on a Raspberry PI <raspberrypi.org>. The software is written in python. The main functions of serpint have to do with controlling the pins as if they were a serial/USB device {1}. It can also be used to control the GPIO pins over a network. Another use is reformatting the control of the GPIO pins so that the serial device {1} controlling them emulates a different device [say, a scratchboard (example included).] However, as the source code of serpint is available (it is not a compiled/compilable application) I hope that many other people will make use of/ make new uses for it.
For more, please read doc/main.odt
+For demo instructions please read doc/demo.odt
{1} Serpint can emulate any device connecting on a /dev/ttyS port, /dev/ttyUSB is currently untested
View
2  bin/monitor.py
@@ -53,7 +53,7 @@ def __call__(self):
O O N N N Connect your volt meter between pin 4
O O N N N [http://elinux.org/images/2/2a/GPIOs.png]
O O N N N And ground
-O O N N N IT SHOULD READ 2.5V
+O O N N N IT SHOULD READ 2.5V TO 3V
O O N N N
O O N N N
O O N NN github.com/602p/serpint
View
2  bin/serpint
@@ -1,6 +1,6 @@
#!/usr/bin/env python
print "SERPINT NETWORK GPIO TOOLKIT"
-print " V1.0.3c "
+print " V1.0.4 "
print " github.com/602p/serpint "
print
View
37 doc/commands.txt
@@ -0,0 +1,37 @@
+Commands for serpint
+
+serpint gpiotoserial serial port
+ This command starts a GPIOINTERP processor on the
+ serial port serial (i.e. ttyS44) and using the port
+ port (i.e. 4444) as a loopback port
+
+serpint serialtosock serial port
+ This command forwards data going to/from the serial
+ port serial (i.e. ttyS44) to the socket port (i.e.
+ 4445)
+
+serpint socktoserial serial host port
+ This command creates a virtual serial port from the
+ data coming over the socket host:port (from a call
+ to serpint.py serialtosock)
+
+serpint serialformatbridge serial port
+ serial2 module
+ This command creates a bridge from serial (i.e.
+ ttyS45) to serial2 (i.e. ttyS46) over port port
+ (i.e. 4446) using the sfb format module module (i.e.
+ /home/pi/Desktop/serpint/sfb/sfb_scratch.py)
+
+serpint help [option]
+ This command displays help about serpint, optionally
+ in the category option (one out of this list:
+ devinfo
+ sfbinfo
+ .)
+
+serpint cleanup
+ This command cleans up (removes) all virtual serial
+ ports on the system.
+
+serpint removeport port
+ This command removes [closes] the TCPIP port port
View
BIN  doc/demo.odt
Binary file not shown
View
65 doc/demo.txt
@@ -0,0 +1,65 @@
+Demo
+
+To run the demo of serpint, follow these instructions....
+
+Part one of the demo will show you the capability of serpint to control the GPIO pins over a serial port. Part 2 will also show you the same thing can be done over a network. The serial monitor that you run has NO GPIO library loaded, only a standard serial library.
+
+For Part One You Will Need....
+
+1. A Raspberry Pi with Screen and Keyboard
+2. A way to check GPIO voltages (Voltimiter, LED)
+3. Serpint (Download from http://github.com/602p/serpint)
+
+For Part Two You Will need
+
+1. Another computer (running linux)
+2. A connection between them, on the same network
+3. Serpint on the other computer
+
+PART 1
+This tests the GPIO control over serial functionality of serpint
+
+ IN A TERMINAL
+1. On your raspberry pi.... Cd to the bin directory of the serpint folder
+2. Run
+./serpint gpiotoserial ttyS44 4444
+This will allow the GPIO pins to be controlled over the serial port ttyS44
+NOTE: It will continue tring to connect UNTIL you do STEP 3! DO STEP 3 ASAP!
+3. Open a new tab/tty and run the built-in serial monitor
+./serpint monitor
+4. In the monitor, enter your serial port as /dev/ttyS44
+5. Attach a voltimeter or light to gpio pins 4 and ground [ see http://elinux.org/images/2/2a/GPIOs.png]
+6. Press space in the monitor to toggle the power to pin 4
+7. When done, press q to quit the monitor
+8. Run
+./serpint cleanup
+
+PART 2 [OPTIONAL]
+This tests the networking functionality of serpint
+
+1. On your raspberry pi.... Cd to the bin directory of the serpint folder
+2. Run
+./serpint gpiotoserial ttyS55 5555
+This will allow the GPIO pins to be controlled over the serial port ttyS44
+3. Run
+./serpint serialtosock ttyS55 5556
+This will forward all traffic from the serial port ttyS55
+NOTE: IT WILL SAY �WAITING FOR REMOTE CONNECTION�, DONT WORRY, THIS WILL GO AWAYIN STEP 6
+4. Make note of your raspberry pi's IP address (you can find this out by doing
+sudo ifconfig|grep �inet addr�
+(you�ll want the top one)) You�ll need this in step 5
+5. On another (linux) computer, download serpint
+6. Cd to the bin folder and run
+./serpint socktoserial ttyS56 192.168.1.7 5556
+You will want to replace 192.168.1.7 with the IP address that you got in step 3
+This will make a serial port ttyS56, from the data sent when you started the code in step 3
+NOTE: THE PROGRAM WILL EXIT. THIS IS NORMAL. IT STARTS A DAEMON AND EXITS
+7. ON THE SECOND COMPUTER...Open a new tab/tty and run the built-in serial monitor
+./serpint monitor
+8. In the monitor, enter your serial port as /dev/ttyS56
+9. Attach a voltimeter or light to gpio pins 4 and ground [ see http://elinux.org/images/2/2a/GPIOs.png]
+10. Press space in the monitor to toggle the power to pin 4
+11. When done, press q to quit the monitor
+12. Run
+./serpint cleanup
+on bolth machines
View
16 doc/main.txt
@@ -0,0 +1,16 @@
+ SERPINT
+Serpint is software for controlling the GPIO pins on the Rasperry Pi over a socket or serial port, and that reformattably over a network.
+
+It can be used to control the GPIO pins from languages that don't already have a GPIO library, but do for sockets or serial, or from programs that expect a serial port, and to do that from half a world away.
+
+
+ Serpint is a toolkit for controlling the GPIO (general pourpouse input/output) pins on a Raspberry PI <raspberrypi.org>. The software is writted in python. The main functions of serpint have to do with controlling the pins as if they were a serial device1. It can also be used to controll the GPIO pins over a network. Another use is reformatting the control of the GPIO pins so that the serial device controlling them emulates a different device [say, a scratchboard (example included).] However, as the source code of serpint is avalable (it is not a compiled/compilable application) I hope that many other people will make use of/ make new uses for it.
+ The main function of serpint (of whitch most others are extentions) is the gpiotoserial command. It creates a virtual serial port/device that is being controlled by a python script. This allows you to control the gpio pins as if they were a serial device. Through that serial port you then can turn pins on and off, and read their values.
+ The 2nd and 3rd functions of serpint come as a pair, allowing you to have a link between a serial port on one machine, and a serial port on another. This allows you to remotely control the GPIO pins on your raspberry pi. This could be used for example, to allow you to put the raspberry pi and some sensors on the roof and read the wind speed and barometric pressure form downstairs.
+ The 4th use of serpint allows you to reformat the data flowing out of a serial port, allowing it to emulate other serial devices. This could be used to have the GPIO pins emulate a scratchboard (example included.)
+
+For instructions on using serpint, read commands.odt
+
+For details on how to use the gpiotoserial command and the reformatting, refer to doc/devinfo
+
+ 1Serpint can emulate any device connecting on a /dev/ttyS port, /dev/ttyUSB is currently untested
Please sign in to comment.
Something went wrong with that request. Please try again.