I had some color Sharpies, which never worked very well, even when I first got them. I just tried them, and all but one, would not even write. I threw them in the trash. Later, I got them out of the trash because I had an idea about how to use the body of each pen to hold solder. These are some snapshots of how I put solder inside each pen body.
Briefly, I used the needle nose pliers to twist off the pen point and the end of the pen. I used a Phillips head screwdriver to coil the solder around the shank. Then I put everything except the metal pen point and the ink cartridge, back together again, with the coil of solder inside the pen body. Easy. I used one of these Solder Pens in the following project. It worked great !!!
Astable Multivibrator Circuit
I do not remember exactly how I got interested in trying to make this circuit? I know that I tried to make it about five times, and failed miserably. All the failed circuits used NPN transistors. Finally, I found a tutorial at Instructables called Two Transistor LED Flasher Circuit that worked for me. That tutorial used PNP transistors. I have no idea if that had anything to do with it, or not? Probably not. Anyway, I have decided I might want to try and make a homemade PCB of this circuit? First of all, I drew the schematic in KolourPaint.
Then I built the circuit on a breadboard. Yeah, I know, right? That breadboard has been cannibalized, for sure. However, there was just enough of it left over to make this circuit.
Wow! that looks really unstable? I did not use a tripod with the camera.
This is my drawing of how I think the PCB layout should be. Why didn’t I use EAGLE to do this?
I used the masking tape mask, fingernail polish resist, and the vinegar/hydrogen peroxide/table salt etchant to make this PCB. Here are some snapshots of the process.
Raspberry Pi and Python Programming
The Python programming language is available as a Free, Open Source download for the Raspbian OS which runs on a Raspberry Pi that is connected to the Internet. Getting it is easy, using the apt-get utility.
$ sudo apt-get install python
After the download is finished, and Python has been installed, I like to remove the downloaded DEB files in order to keep disc usage as low as possible:
$ sudo apt-get clean
Once that is done, it is a good idea to check and see if Python is working okay. One way to do that is to write a Hello, World! program. This can be done using the interactive interpreter in a terminal, at the command-line prompt.
Python 2.7.3 (default, Mar 18 2014, 05:13:23)
[GCC 4.6.3] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>> print ‘Hello, World!\n’
After each line is typed into the interactive interpreter, press the Enter key to run it. Press Ctrl-D or enter quit() at the prompt to exit the interactive Python interpreter.
Alternatively, you can open a plain text editor, and type the program in, then save it as hello.py, then invoke the Python interpreter to run that file:
$ python hello.py
Also, if the first line of hello.py is:
then the file can be made executable with this command:
$ chmod u+x hello.py
and executed directly from the command-line like this:
Don’t forget to put a dot slash in front of hello.py.
If everything is working okay, please continue. If any problems occur, now is the time to fix them. It is beyond my skill level to try and help anyone who is having a problem with Hello, World!. The only thing I can suggest is: Google may be your friend.
Creating Adventure Games
In order to learn the Python programming language, I decided to start out by coding an Old School Text Adventure Game.
I am not old enough to know about the early days of personal computers. From what I understand, from reading, they did not have much memory, and they usually booted up to a ROM BASIC. There were all sorts of books and magazines back then that had the BASIC source code for all kinds of programs, including games. One such book was written by Australian author Tim Hartnell (1951-1991). It was called Creating Adventure Games On Your Computer (1984). I will be using CAGOYC as a reference book. This book is out-of-print, but used copies can still be found. It can also be found at the Internet Archive in various formats. Look for used, dead-tree copies at AddAll.Com.
The best thing about CAGOYC is that it explains what a Text Adventure Game is, and also has all the step-by-step details of exactly how to write a Text Adventure Game in BASIC.
BASIC can be translated into Python. In fact, I got this idea from reading The MagPi magazine. The May 2014 Issue (21) has a Python program of Stronghold Of The Dwarven Lords which first appeared in Tim Hartnell’s 1984 book, Giant Book Of Computer Games. I have not yet been able to make that game run properly. I may try translating it from BASIC to Python myself, and see if I can do any better?
So what I am going to try to do here is share my trials and tribulations of translating some of the Text Adventure Games in CAGOYC, from BASIC to Python. I will expect anyone interested in this, to find a copy of CAGOYC for themselves, if more detail is needed. Each post, from now, until I can go no further, will have a Python programming installment at the bottom of the post.
Since I did not have any idea how a Text Adventure Game was supposed to work, what I did was run the BASIC source code from the book, in an interpreter called QBASIC, running in an emulator called DosBox, on my desktop PC. This required some help from a friend who is familiar with old line-numbered BASIC. QBASIC does not require line numbers to be used, and it reads a source code file a little bit differently than the old interpreters. QBASIC does not go exactly line-by-line, in sequence, like the old line-numbered BASIC interpreters did, so some things had to be moved around; mainly DIMs and DEFINTs, which had to be put at the top of the code). However, once we got it working, I was able to experience one of the wonderful, exciting, and frustrating Text Adventure Games, first-hand. It will be a challenge to translate from BASIC to Python, but I am looking forward to giving it a go.
So stay tuned for more installments of Python Programming on the Raspberry Pi in upcoming posts.
For more detail: Solder Pen, PCB Circuit, Python Programming
Current Project / Post can also be found using:
- python programming circuits