Thursday, October 30, 2014

Network printer install

Setting a network printer is easy as setting up most any other printer. You need to know about the printer location make and model. You will also need some administrative rights to install the printer. In this case, we will be using the Cups web based utility to accomplish adding the printer. First, if you do not already have access, you need access.

$ sudo adduser $USER lpadmin
Adding user `eddie' to group `lpadmin' ...
Adding user eddie to group lpadmin
Done.

Note: for more command line goodies, see http://www.cups.org/documentation.php/options.html

Note if you do not get the cups page in the browseryou will need to install it.
$ sudo apt-get install cups

Whew, that is all the command line you need to do. Now you need to open your web browser to "localhost:631". Localhost is just a generic name so you do not have to use your real ipaddress.  When you first go to Cups, you will be asked some rudimentary  questions about your setup.



Then you need to choose a printer.


On this network you have one print server that has two parallel ports and one usb port. Notice that cups recognized the equipment (make sure it is turned on!). You could have just as well chose a local printer if that was the one you wanted to use. You can always add more printers later. For now we are choosing pportusb3 or the third port on the printer server that has a usb interface.






The we can choose the printer manufacturer.  Press continue. In our case, we have an HP printer. Pretty common nowadays. For the computer to be able to communicate and control the printer, you need what is known as a printer driver. Traditionally you would have to go find the printer install CD/ DVD. Fortunately Cups already has quite a few printer drivers to choose from. So the printer driver install media will be pretty much a drink coaster.





Our printer is an OfficeJet 6110. Awesome, that is one of the available drivers! So press add printer and let the driver be installed. Then you will need to install the default options. Go with the existing default options till you have seen a print out. You can easily change these options later.  Press set default option.




 Your printer should be pretty much setup now. You can go the admin pull down menu and print a test page to see if any default options need to change..


Once you have chosen to print a test page, you will get a message at the bottom of the screen about the page being printed.



You are now done with the printer setup. You can visit the other menus or just close the browser. Now the next time you need to print, the print option should show you your printer.





Wednesday, October 29, 2014

Geek food.

Home made pizza or should I say the short life of pizza.

Before:



During:


After:


Whole chicken pays for itself.

Last chicken we bought was only 4 dollars.  Generated about a gallon of polenta with only a few cups of corn meal. Polenta sells for about 4 dollars a tube. A tube is only a few cups of cooked cornmeal.


Military food slang.

army strawberries - prunes
battery acid - coffee
bokoo soused - very drunk
bug juice - Kool-Aid and other powder based drinks
bullets - beans
buzzard - chicken or turkey
cackleberry - egg
canned cow - canned condensed milk
canteen - a liquor store on base
chow - food, a meal
chow down - to eat
chowhound - first in line at the mess
"come and get it" - the time honored call of the mess sergeant
desecrated vegetables - dried or dessicated vegetables
fly light - to miss a meal
gut-packings - food, rations
hardtack - a baked mix of flour and water, soaked in water overnight, and fried in grease for breakfast
hooch - hard liquor
java - coffee
joe - coffee
kitchen police, K.P. - those assigned menial clean-up duties
lurp - Long Range Patrol Ration
meal refusing to exit, meal rejected by Ethiopia - meal ready to eat M.R.E.
moo juice - milk
mud - coffee
mystery meat - meat that lacks clear identity
rabbit food - greens, especially lettuce
repeaters - beans, sausages, due to the gas they produce
shrapnel - Grape Nuts
tube steak - hot dog

Danger: Ipad.


Will the Ipad put you at risk to be robbed or murdered?

SOS


Toast some bread.




Add some left over chicken,




And potato like gravy.


and some green beans.


Topped with a bit of parmesan cheese and you are in heaven for a poor man's
meal.

Tuesday, October 28, 2014

Installing Arch.

Installing Arch Linux

1. Get Arch Linux.



2. Download Arch installation media. The primary forms are image files for CD or USB Key available on the Arch Linux website. Go to the Arch Linux website and select a version. If you are unsure which form to download, select the Core ISO appropriate to your processor architecture (e.g. i686 or x86)



3. Burn the image to CD using your preferred CD recording software or, in Windows XP, by right clicking on the .iso file and selecting “Copy Image to CD”. Alternately, if you downloaded the USB Key version, use the Bash command: dd if=path-to-iso of=/dev/sdX.[1] Alternatively you may use other software to image the USB drive.



4. Insert the prepared device into the computer you are installing Arch on and restart the computer. The computer should start up into a menu system similar to the one shown below.



5. Select “Boot Arch Live” and wait for the system to auto-detect your devices and start up. When it is finished, you will be running Arch Linux live from the installation media.



6. Log in as root by typing root at the login prompt. It does not require a password.



7. Run the installation script by entering /arch/setup. The menu based process is designed for ease of use, and will give useful feedback.



8. Use the arrow keys to highlight "Select Source" and press enter. If you chose the core installation media select “CD-ROM or OTHER SOURCE”. Select OK at the prompt. You will then be returned to the main menu.



9. Select "Set Clock". Choose the appropriate timezone and then select set time and date and choose the appropriate time format. Confirm that the time is correct and select return.



10. Select “Prepare Hard Drive” and select the appropriate options. If you are installing Arch on a clean system or do not intend to dual boot with another preexisting operating system, simply select “Auto Prepare.” If you would like to partition the drive manually select the appropriate option. Make sure to check documentation on partitioning and formatting Linux drives.



11. Enter “Select Packages” and look through the packages available, pressing space to select the highlighted package and enter to finish selection. The base system will always be installed; for a minimal system, select no packages. For a system with additional basic tools, select the base-devel package category, or go through the packages and select those you want individually.



12. Enter “Install Packages” and wait while the script installs your operating system. This may take a while.



0dh. Enter “Configure System” and go through the options. If you do not know which to select, choose the default option. When you reach the screen labelled “Configuration” with files listed, go through each if you wish to check or change the default contents of your config files. Make sure you set a root password that you will remember, you will need it to administer your system. Beginner users can leave the rest of the configuration files alone.



14. Select “Install Bootloader” and choose your bootloader. If you are unsure which to select, choose GRUB. At this point, you will be prompted to examine your bootloader configuration file. If you are not dual booting, you will not need to make changes. If you have a Windows operating system installed, ensure the Windows entry in the file is not commented out by removing the "#" signs in front of each line. If you want Windows to be the default, make sure you change the default line. When prompted to select the boot device to install the bootloader, select the entry without a number at the end, such as /dev/sda.




15. Exit the installer and type “reboot” to restart your system. Wait for your computer to boot into your new Arch Linux operating system. Login as root with the password you entered and enjoy your new system.

    Escaping from a mistake?


    Dark detector

    Simple dark detector circuit. A quick and easy night light circuit.




    The enhancements could be added.






    Monday, October 27, 2014

    PC Robot starter OS




    Robot os. The infinite loop.


    While true%
        ' set or reset values
        ' input sensor values
        ' Other jobs
        ' Do what is needed based on input values.
    wend


    Part I. Set or reset values.

    Part II Get sensor values.



    Using basic, the command to read from ports in qbasic is INP. The address you need to read from is the address of the parallel port (usually 378h) + 1; so the usual address is 379h. As i mentioned before, the pins used for input are 10-13 and 15. Reading the different pins is little harder than writing to the ports, as you have to mask out the pins your not interested in. When you read the port, the first 3 bits returned are not used. For example, the qbasic code below would read pin 12 (out of paper). When this port is high, "Out of paper / pin 12 toggled" will be displayed:
     
    data = inp(&h379)
    IF (data and 32) = 32 then print "Out of paper / pin 12 high"
    

    The table below list the pin input pin number, its normal purpose, and the number required to read it (eg 32 was used in the above example):


    Pin Number Normal Purpose Number to read
    10 Ackowledge 64
    11 High when not Busy 128
    12 High when out of paper 32
    13 High when printer online 16
    15 High when no error 8

    If you understand binary, you should immediately see where these numbers are coming from, and why they are used to mask out all of the other pins we aren't trying to read. The simplest thing you can use to test this is to just connect a switch between an input pin and a ground pin (18-25). For example, if you connect a switch between pins 15 and 20, you could use the following code to monitor when the switch is pushed:
     
    start:
    res = INP(&H379)
    CLS
    IF (res AND 8) = 8 THEN PRINT "Button pushed" ELSE PRINT "Button NOT pushed"
    FOR delay = 1 TO 500: NEXT delay
    GOTO start
     
    I know this code is a little messy, and will flicker, but it's written for clarity. The same code can be used to monitor the other four input lines by changing to the '8' to another number from the table.


    Part III Other jobs.
    Deliver reports to the outside world. etc etc etc

    Part IV Do what is needed based on input values.

    We can use Qbasic or freebasic to set values at the parallel port for such jobs as controlling the power train (aka turning or moving forward/backward). Moving other attachements. See also:


    http://www.instructables.com/id/Mini-parallel-port-break-out-cable/
    http://www.instructables.com/id/No-solder-parallel-port-break-out/


    Control the individual output lines on the parallel port.

    parcon.c

    #include <stdio.h>
    #include <unistd.h>
    #include <sys/ioctl.h>
    #include <sys/io.h>

    char *binprint( unsigned char x, char *buf )
    {
      int i;
      for( i=0; i<8; i++ )
        buf[7-i]=(x&(1<<i))?'1':'0';
      buf[8]=0;
      return buf;
    }

    int main( int argc, char *argv[] )
    {
      char c;
      unsigned char val;
      char buf[9];
      int x;
      if( argc<2 )
      {
        printf("  example usage: parcon 1l 2l 3h 5h 8l\n");
        return 2;
      }
      if( ioperm(888,1,1) )
      {
        printf("Couldn't get port 888\n");
        return 1;
      }
      val = inb(888);
      printf("old = %s\n",binprint(val,buf));
      for( x=1; x<argc; x++ )
        if( argv[x][1]!='h' )
          val &= ~(1<<(argv[x][0]-'1'));
        else
          val |= 1<<(argv[x][0]-'1');
     
      printf("new = %s\n",binprint(val,buf));
      outb(val,888);
      return 0;
    }

    Sunday, October 26, 2014

    Piadini = Quesedilla




    Mexican quesedillas filled with mashed pinto beans and cheddar cheese.

    Italian piadini filled with mashed lentils.and mozzarella cheese (or cheddar cheese).







    Legumes

    Most people say you do not need to soak legumes before cooking. Unless, we are in a hurry then we usually do not. Personally the yield seems to be larger when you do pre-soak legumes such as lentils.  We like to immerse lentils in warm water from the tap with a little bit of baking soda. Cooking time is reduced, therefore you save on energy. Be also sure to drain the lentils and use fresh water for boiling.





    By the say, do not leave theme there too long or they will start to ferment. That is another story.


    Friday, October 24, 2014

    Antenna redo.

    Made an antenna guessing at the specs. Also did it do see how critical the angle of the dipoles were. Antenna pattern: http://web.archive.org/web/20130610164242/http://tradewhen.com/Log-Periodic-Pattern.pdf

    Original version:


    The antenna did not work that well. So I went back and looked at the original picture and noticed the angle was quite different.






    Oops, the original angle used was a bit wide. Hmm. S/B:

    Now, the new version with the corrected angle.


    Now to test it. Tested average....

    Other antennas to look at:  http://www.instructables.com/id/Antennas-TV-Wifi-and-etc/

    A bit about antennas: