Author reserves the right to add or remove content from any post at any time without prior notice or approval.
Had to fix the printer and some other stiff .
gMTP finally seems to be working well.
For the latest cartoons see http://itcartoons.blogspot.com/
Use at your own risk.
Parallel and serial I2C
Note : no warranty, no liability, project is provided ‘as is’ but I hope you will enjoy it !
- binaries : download (http://sourceforge.net/project/showfiles.php?group_id=179066)
- Check sourceforge for the source.
Access to I2C components from a very low cost interface, in pure python, over serial, parallel (maybe more in the future) interfaces, with a minimum hardware. This implementation is intended to be fast but simple and minimalist.
- handle SDA and SCL pins
- handle your own hardware interface simply adding your puthon driver in drivers directory,
- auto-detect available interfaces (COM1, COM2, LPT1, etc…)
- LM75/DS75 I2C sensors,
- analyse SCL/SDA signals with pyScope :
- add more I2C components,
- add your own driver if you send it to me,
>>> import I2C >>> import I2C.sensors >>> i2c = I2C.BusI2C('COM2') >>> i2c.bus.setSpeed(2000) # you can set i2c speed adapted to your hardware >>> sonde = I2C.sensors.LM75('Room 1', i2c) >>> print "T = %02.03f C" % sonde.getTemperature()
Example minimal serial port I2C interface
This interface is really low speed and minimalist, it’s based on specific optos. You can find better also better solutions : http://www.standardics.nxp.com/support/documents/i2c/pdf/optoisolation.pdf
Example minimal parallel port I2C interface
It-s possible to select SDA input signal, python driver can be easily adapted to you choice.
Python packages required
- pySerial if you plan to use I2C over serial port
- pyParallel if you plan to use I2C over parallel port
$ sudo apt-cache search pyparallel
python-parallel – pyparallel – module encapsulating access for the parallel port
$ sudo apt-cache search pyserial
python-serial – pyserial – module encapsulating access for the serial port
python3-serial – pyserial – module encapsulating access for the serial port
pyParallel need you install and start giveio.sys driver
pyParallel on linux is based on ppdev module, make sure ppdev module is loaded and not lp. add change device access rights to make non root users or add users in right group (lp group on most systems). Use a non production computer for this as the parallel port may not print normally after making these adjustments. On most systems, ppdev is not the default parallel port handler, you must make sure module ppdev is loaded :
sudo modprobe ppde sudo rmmod lp sudo chmod go+rw /dev/parport0
Install from tarball
tar -xvzf pyI2C-0.3.tar.gz cd pyI2C python setup.py install
Even this probably thirty year old TV with the right output from an old computer. Like to play ninvaders on it as well as using it as a terminal. Command line is not dead,
Bluray has never really caught on, but we can still use dvd players. Dvd players with composite input can also be used as monitors. Here we are running Reactos.
Was bored tonight so I did a college football page scrape and the original version is only good for the current week. Still needs a bit of work such as better formatting, but you get the idea.
Saturday, September 13, 2014
Rice vs Texas A&M
1 2 3 4
Rice 0 7 0 7
Texas A&M 7 14 7 28
Arizona State vs Colorado
1 2 3 4
Arizona State 14 10 24
I usually save data to file for editing
./gcfs.sh > filename
#################################### # Score Grabber # #=============================== # Assignments # -------------------------------- datafile="tcf" let "flag = 0" # end assignments #================================= # # Get data file #--------------------------------- elinks -dump "www.ncaa.com/scoreboard/football/fbs" > $datafile #================================= # # Extract and display data #--------------------------------- while read line do fdata[$a]=$line echo $line | grep -q "NCAA Scoreboard" if [ $? -eq 0 ]; then # header clear let "flag = 1" fi if [ $flag -eq 1 ]; then echo $line | grep -q "Featured Sections" if [ $? -eq 0 ]; then let "flag = 0" else echo $line | grep -q "GameCenter" if [ $? -eq 0 ]; then let "response = donothing" else echo $line | sed 's/\[.*\]//' fi fi fi let "a += 1" done < $datafile # footer echo --------------------------------------------- echo #=================================== # End. ####################################
Update: This new version will show past data and scheduled match ups for future weeks.
#################################### # Score Grabber # #=============================== # Assignments # -------------------------------- datafile="tcf" let "flag = 0" let "year = 2014" let "week = 4" if [ "$week" -lt "10" ]; then let "a = 0" fi # end assignments #================================= # # Get data file #--------------------------------- elinks -dump "www.ncaa.com/scoreboard/football/fbs/$year/$a$week/" > $datafile #================================= # # Extract and display data #--------------------------------- while read line do fdata[$a]=$line echo $line | grep -q "NCAA Scoreboard" if [ $? -eq 0 ]; then # header clear let "flag = 1" fi if [ $flag -eq 1 ]; then echo $line | grep -q "Featured Sections" if [ $? -eq 0 ]; then let "flag = 0" else echo $line | grep -q "GameCenter" if [ $? -eq 0 ]; then let "response = donothing" else echo $line | sed 's/\[.*\]//' fi fi fi let "a += 1" done < $datafile # footer echo --------------------------------------------- echo #=================================== # End. ####################################
Tasksel is not automatically installed, so you will need to install it.
$ sudo apt-get install tasksel
You can easily select install the lamp (Linix, Apache2, Mysql, and PHP) to set up a minimal web server. While doing that you can tell the system not to install the gui desktop to make a lean and trim system. You can also install several options at once, but you need to be careful.
To see what packages a system has, you can use the command: (varies from distribution to distribution). It will even tell you what is installed.
$ sudo tasksel –list-tasks
i server Basic Ubuntu server
i openssh-server OpenSSH server
u dns-server DNS server
u lamp-server LAMP server
i mail-server Mail server
u openstack Openstack
u postgresql-server PostgreSQL database
i print-server Print server
You can also see what programs are included in a specific package
$ sudo tasksel –task-packages server
You can still install and remove individual packages the old fashion way. I will not dwell on all the options, but you can always
$ man tasksel
for more details.
$ dpkg –get-selections > installed-software.log
read $ dpkg (dash)(dash)get-selections > installed-software.logTo use for another system:
$ dpkg –set-selections < installed-software.log
read $ dpkg (dash)(dash)set-selections < installed-software.log
$ apt-get dselect-upgrade
Bsd short for Berkeley Software Distribution was originally a closed source operating system software, but various flavors have become open source software. Bsd has been around since 1977, so it is very mature and dependable. One version known as FreeBSD allegedly became the basis for the Apple operating system for the newer Macintosh computers. BSD an offshoot of Unix can be very gui oriented not just text based like it’s ancestors. Shown below is open BSD. OpenBSD even comes with a web server pre-installed unless you choose not to install it.
Of course, if you are a hardcore nix person, you can still use BSD without all the gui. In the picture below is NetBSD running in the text mode with a familiar game of Tetris running on it.What is unusual about this system is that it was installed from the internet using floppy disks as the boot media. Try that with your proprietary systems. The perfect system for people without a lot of resources.
Like Openbsd and Freebsd, they both will run on about anything with a cpu. In fact, I still think we have the cdrom that will run on the Sega Dreamcast.
Like Linux, BSD has a tremendous amount of software available from various repositories. Linux and BSD are not exactly alike, but you can move from one to the other without much trouble. You can always use the “man” command. Want a change, then give BSD a try.
Netbsd supported platforms:
Tier I: Focus — support is part of NetBSD’s strategy (top)
Focus ports are the architectures that NetBSD targets as part of its strategy. The platforms consist of modern server, embedded and desktop architectures. The guidelines are as follows:
- Machine independent (MI) changes should benefit these ports.
- MI changes must be tested on at least one of these ports.
- It is the developer’s responsibility to implement machine dependent (MD) support necessary for changes, fix build problems and aid in debugging with any platform-specific problems.
- Even within a port, common sense should be used (cf. the i386 port which still supports 486).
- Regressions in the automated NetBSD test suite (/usr/tests) are not allowed.
Currently there are 8 ports with Tier I status. They are:
Port CPU Machines Latest Release amd64 x86_64 64-bit x86-family machines with AMD and Intel CPUs 6.1.4 evbarm arm ARM evaluation boards 6.1.4 evbmips mips MIPS-based evaluation boards 6.1.4 evbppc powerpc PowerPC-based evaluation boards 6.1.4 hpcarm arm StrongARM based Windows CE PDA machines 6.1.4 i386 i386 32-bit x86-family generic machines (“PC clones”) 6.1.4 sparc64 sparc Sun UltraSPARC (64-bit) 6.1.4 xen i386, x86_64 Xen Virtual Machine Monitor 6.1.4
Tier II: Organic — evolving at its own pace (top)
Organic ports are highly valued by the NetBSD project, but their development is not as tightly mandated as that of the focus ports. Generally speaking, the hardware platforms of organic ports have lost their industrial relevance, or there is not enough community activity for the port to make it to the first tier. The guidelines are as follows:
- Generally speaking, the port boots and works, but keeping it working is the responsibility of the user community. This includes, but is not limited to, kernel changes and toolchain upgrades.
- Developers committing MI changes are still encouraged to keep ports up-to-date when it can be easily done.
- MI architecture decisions may penalize organic ports if there is a benefit for focus ports.
- If the port is not working at release time, a release is done without the port and the port is moved down to the life support tier.
Currently there are 50 ports with Tier II status. They are:
|acorn26||arm||Acorn Archimedes, A-series and R-series systems||6.1.4|
|acorn32||arm||Acorn RiscPC/A7000/NC and compatibles||6.1.4|
|algor||mips||Algorithmics MIPS evaluation boards||6.1.4|
|alpha||alpha||Digital Alpha (64-bit)||6.1.4|
|amiga||m68k||Commodore Amiga, MacroSystem DraCo||6.1.4|
|amigappc||powerpc||PowerPC-based Amiga boards||6.1.4|
|arc||mips||Machines following the Advanced RISC Computing spec||6.1.4|
|atari||m68k||Atari TT030, Falcon, Hades||6.1.4|
|bebox||powerpc||Be Inc’s BeBox||6.1.4|
|cats||arm||Chalice Technology’s Strong Arm evaluation board||6.1.4|
|cesfic||m68k||CES’s FIC8234 VME processor board||6.1.4|
|cobalt||mips||Cobalt Networks’ Microservers||6.1.4|
|dreamcast||sh3||Sega Dreamcast game console||6.1.4|
|emips||mips||Machines based on “Extensible MIPS”||6.1.4|
|epoc32||arm||32bit PSION EPOC PDA||none|
|evbsh3||sh3||Evaluation boards with Renesas (Hitachi) Super-H SH3 and SH4 CPUs||6.1.4|
|ews4800mips||mips||NEC’s MIPS based EWS4800 workstations||6.1.4|
|hp300||m68k||Hewlett-Packard 9000/300 and 400 series||6.1.4|
|hp700||hppa||Hewlett-Packard 9000/700 series||6.1.4|
|hpcmips||mips||MIPS based Windows CE PDA machines||6.1.4|
|hpcsh||sh3||Renesas (Hitachi) SH3 and SH4 based Windows CE PDA machines||6.1.4|
|ia64||itanium||Itanium family of processors||none|
|ibmnws||powerpc||IBM Network Station Series 1000||6.1.4|
|iyonix||arm||Iyonix ARM pc||6.1.4|
|landisk||sh3||SH4 based NAS appliances by I-O DATA||6.1.4|
|luna68k||m68k||OMRON Tateisi Electronics’ LUNA series||6.1.4|
|macppc||powerpc||Apple Power Macintosh and clones||6.1.4|
|mipsco||mips||Mips family of workstations and servers||6.1.4|
|mmeye||sh3||Brains’ mmEye Multi Media Server||6.1.4|
|mvme68k||m68k||Motorola MVME 68k SBCs||6.1.4|
|mvmeppc||powerpc||Motorola MVME PowerPC SBCs||6.1.4|
|netwinder||arm||StrongARM based NetWinder machines||6.1.4|
|news68k||m68k||Sony’s m68k based “NET WORK STATION” series||6.1.4|
|newsmips||mips||Sony’s MIPS based “NET WORK STATION” series||6.1.4|
|next68k||m68k||NeXT 68k ‘black’ hardware||6.1.4|
|ofppc||powerpc||Generic OpenFirmware compliant PowerPC machines||6.1.4|
|pmax||mips||Digital MIPS-based DECstations and DECsystems||6.1.4|
|prep||powerpc||PReP (PowerPC Reference Platform) and CHRP machines||6.1.4|
|rs6000||powerpc||MCA-based IBM RS/6000 workstations||6.1.4|
|sandpoint||powerpc||Motorola Sandpoint reference platform||6.1.4|
|sbmips||mips||Broadcom SiByte evaluation boards||6.1.4|
|sgimips||mips||Silicon Graphics’ MIPS-based workstations||6.1.4|
|shark||arm||Digital DNARD (“shark”)||6.1.4|
|sparc||sparc||Sun SPARC (32-bit)||6.1.4|
|sun3||m68k||Sun 3 and 3x||6.1.4|
|x68k||m68k||Sharp X680x0 series||6.1.4|
|zaurus||arm||Sharp C7x0/C860/C1000/C3x00 series PDA||6.1.4|
Let’s make pasta