Posts

Setting up a Python CGI Sandbox on Windows

It makes sense sometimes to set up a sandbox for development of CGI.  By sandbox I mean a computer isolated from the web running all the programs needed to develop for CGI.  If you have a Windows machine there are fewer resources available online for setting up Apache, etc than for a Linux box. Note that installing a Apache server does take some resources but I noticed no difference on the 3 GHz Pentium D machine with 1 Gb RAM that I was using. follow these steps in setting up a windows machine: Install Python If you are going to put scripts on a server at an ISP such as 1and1 or GoDaddy you should be aware of the version of Python available to your hosting package.  For 1and1 I installed Python 2.5.  Also be aware that neither 1and1 nor GoDaddy use modpython at this time.   Install Apache Use a standard install of Apache.  It should take only a few minutes to install and configure.  When you are setting up make it "localhost". Add python as a C...

CamSoft System CS-209 - $1991.00

Image
When I bought my Bridgeport CNC Mill, it came with a CNC CS-209 control package made by CamSoft.   Here is a description from the CamSoft Website: CNC Lite software, AS3000 3D CAD/CAM system, USB Jog Stick Handheld Controller, CS 14000 - 4 axes stepper motion board, cables with user provided computer. CNC Lite Software AS3000 Cad/Cam System USB Jog Stick Motion Boards Limited time special offer starting at $1,991 I was excited about using this to retrofit the mill.  Considering the kit had never been installed I thought that it should be pretty easy to get the mill up and running.  The kit even comes with CAD software which is a big expense for CNC machining. The CAD software is called Advanced System 3000 and requires a hardware key (I think).  The software was on the computer that came with the mill but it was not very intuitive.  I have used AutoCAD and Solidworks extensively so I was surprised that I could not really just start drawing. Th...

Simple User Settings in a C# Windows Forms Application

There is a lot of confusion and long programming blog posts on application settings for a Windows Forms Application in C#.  I needed a quick and simple way to save a few user specific settings such as com port settings and names of labels on a customizable GUI. I have used the Python config package written by Vinay Sajip in a previous project.  The nice thing about the package was that it opened a config file and made an object which could be accessed as config.ports.baudrate .  Since Python is not typed the config file, which is simply Python code without any punctuation marks, is flexible, fast and easy to create. I had hoped that C# would have an easy way to build something similar.  I found an post early on suggesting using app.config.  After reading MANY posts on configuration and trying a lot of code that would not work on Visual Studio 2011 I had about given up and started writing my own. Luckily I found a simple solution. A settings file is alread...

Setting up Ubuntu for Automatic Turn-on in Emc2

After booting Ubuntu, logging in, and starting up Emc2 for the past year, I am getting lazy. So I setup Ubuntu to automatically log in to my main account and start the EMC2 program. It is different than doing the same thing on Windows but possible (all thing that are possible in Windows are so in Linux usually with MANY more options...) Setting up the computer to automatically log in to an account: NOTE: This should probably not be done if the machine is on a network. This one is simple and easy to find with a Google search: Click on System -> Administration ->Login Window Click on Security The click on "Enable Automatic Login" And select the name of your user in the box below it. Setting up the machine to run a program like Windows "Start Menu" My first thought was to modify the .login file which is the old school way to start programs outside of a windowing environment (back in 1987...) With Ubuntu you have to start a program after the wind...

C# Textbox - Enter to go to next control

I was building a Windows Form Application in Visual C# Express 2010 and had a problem that needed a lot of searching to figure out.   I could not get a value to "enter" and tab to the next textbox when I hit the  Enter key. After much trial and error (most of which would work but I still got a bell when I hit Enter ) I found this. Enter this as the KeyDown Event. Note that KeyPress uses KeyChar return types. private void textbox1_KeyDown( object sender, KeyEventArgs e) {       //checks for Enter, suppresses it and sends a tab       if (e.KeyCode == Keys .Enter && e.Modifiers == Keys .None)     {         e.SuppressKeyPress = true ;  //eliminates the enter key *BELL*         SendKeys .Send( "{TAB}" ); //changes focus to the next control     } }

DIY CNC Milling Machine Control Panel for EMC2

Image
This is meant to be an addition to a regular industrial style alphanumeric keyboard with trackball. It contains the most widely used functions as far as I now know. Since I am using a CNC4PC C11G I only have 5 inputs. All these functions are available on the keyboard within EMC2 and will not require a separate input. This panel will require a keyboard encoder either bought, ripped from an old keyboard, or made with a custom pcb. Keyboard encoders are available from Hagstrom, Ultimarc ($40) and Vetra. Beyond Logic has all the information for rolling the code for your own keyboard controller which has some advantages. If you code your own then you can include functions for rotary switches (that include one-shots) and analog inputs. This control panel is meant to be a cheap way of controlling the machine before or in conjunction with an MPG. This panel can be made for less than $200 which is a lot cheaper than an MPG. One of the things this is missing is indicators/blinken lights...

Sparkfun Freeday - A Bust

So many people on the net know about Sparkfun. It is a quirky website out of Boulder Colorado that sells electronic kits/gadgets/pcbs/components for building your own whatever. They concentrate on Ardunio type single board computers. Today was "Freeday" where they gave away $100 to the first 1ooo customers. But before today they made a big deal about how they tuned up their servers to handle the load. Maybe they were a bit optimistic but MANY people who tried to participate (including myself) spent 2 hours hitting "refresh" when all we had to do was click "confirm order." Now I (and many other people) have a huge level of frustration that because the site wouldn't let us through, we lost out. In other words the "free" offer was not played fairly because their servers slowed to a crawl. I would totally accept having the money go quickly (in something like 5 minutes) and I just missed out. But clicking refresh for 2 hours (literally...