Teach The Net
Home of the Seanybob
  • Home
  • About Me
  • Links
  • My Portfolio
  • My Programs
  • USURP

MsComm Control

Robotics, Visual Basic No Comments »

So… to run some of the VB programs on here (such as the robotics programs), you may find you need the MsComm Control.

This site has some good information about this control, as well as a download link. Alternatively, I have their file backed up here.

After you download the file, put it in your c:\WINDOWS\system\ directory.


June 24th, 2009 |



SB Shutdown Timer

My Programs, Visual Basic No Comments »

I wanted a simple program that I could enter a number of hours/minutes, start it, and it will run a timer that will shut down my computer when it hits 0.

Is that too much to ask for?

Windows has built in functionality for this sort of thing, but only for xx seconds (as far as I know). I wanted a bit longer.

Rather simplistic, but it gets the job done.

Download:
SbShutdownTimer.exe


May 28th, 2009 |



A pistol and a toothbrush

Quotations No Comments »

“A pistol is an excellent argument with a gentleman who can twist steel pokers into knots. That and a tooth-brush are, I think, all that we need.” -Sherlock Holmes, The Adventure of the Speckled Band


May 27th, 2009 |



Series of relationships.

Quotations No Comments »

“The modern dating system does not train young people to form a relationship. It trains them to form a series of relationships, and further trains them to harden themselves to the break-up of all but the current one.”
Douglas Wilson, Her Hand In Marriage


May 26th, 2009 |



XOR binary data in VB.NET

Visual Basic No Comments »

Little function to XOR binary data. I did a bit of googling but didn’t find one quickly, so wrote my own.

Private Function XORString(ByVal bin1 As String, ByVal bin2 As String) As String
Dim count As Integer
Dim XORStr As String = “”
For count = 0 To bin1.Length() - 1
If bin1.Chars(count) = bin2.Chars(count) Then
XORStr = XORStr + “0″
ElseIf bin1.Chars(count) <> bin2.Chars(count) Then
XORStr = XORStr + “1″
End If
Next count
Return XORStr
End Function


May 12th, 2009 |



Importing IR signals with the help of some programs (~5 seconds per)

USURP No Comments »

Download AutoHotKey if you don’t have it already.

Download Audacity 1.3.x if you don’t already have it.

Download the two SAGE plugins for Audacity (written/editted by yours truly - borrowing lots of code from other ‘experts’). Unzip them into your audacity/Plug-Ins folder (by default, C:\Program Files\Audacity 1.3 Beta\Plug-Ins).

Download the three SAGE AutoHotKey scripts to automate the tasks for you. Store these anywhere.

Start Audacity 1.3.x. Hit ‘r’ to start recording. Press the button on the remote to copy. Count to 2. Press it again. Stop recording. You should now have something that looks somewhat similar to this:
Image 1

You will see several little spikes. Before going any further, MAKE A BACKUP! Now select one of the spikes (doesn’t have to be exact) and press the button in the top right corner (shown in the picture circled with a red circle.
Image 2

You should now see something like the picture below. Highlight just the wave portions, and hit control+x (to cut it).
Image 3

Now hit control+shift+n to make a new track. Put the cursor at the beginning and hit control+v (paste). Now delete the first track that you just cut this signal out of.
Image 4

Now run the Auto Hot Key Scripts (all three of them). Just double click their icons - you should see 3 little mini icons go to your tray next to your clock.

Now hit ALT+1.

Combine the two tracks into a stereo track by clicking the little down arrow next to ‘Audio Track’ in the track on top and clicking ‘Make Stereo Track’.
Image 5

In the above picture, notice how I selected the portion of the wave from the beginning up to the first spike? Do so on yours, then hit control+L (silence). It should look SLIGHTLY similar to the image below, except it will be a stereo track with the second track being silenced too.
Image 6

Now hit ALT + 2.

Now hit ALT + 3.

Choose a filename and save it.

When you are done, close the auto hot key scripts by right clicking their icons in the tray area (next to your clock) and clicking Exit.

The first time you do this, it might take you 20 seconds. As you get used to the flow of it, you can get it down to 5, I’m sure :)


May 8th, 2009 |



Importing IR signals manually (approx 30-60 seconds per)

USURP No Comments »

This guide assumes that you already have some sort of hardwire device for inputting IR signals as audio.

Start Audacity 1.3.x. Hit ‘r’ to start recording. Press the button on the remote to copy. Count to 2. Press it again. Stop recording. You should now have something that looks somewhat similar to this:
Image 1

You will see several little spikes. Before going any further, MAKE A BACKUP! Now select one of the spikes (doesn’t have to be exact) and press the button in the top right corner (shown in the picture circled with a red circle.
Image 2

You should now see something like the picture below. Highlight just the wave portions, and hit control+x (to cut it).
Image 3

Now hit control+shift+n to make a new track. Put the cursor at the beginning and hit control+v (paste). Now delete the first track that you just cut this signal out of.
Image 4

In the above picture, notice how I selected the portion of the wave from the beginning up to the first spike? Do so on yours, then hit control+L (silence). It should look like the image below when you’re done (at least, somewhat). *NOTE - this step is not actually necessary in the manual guide, as it is ‘redone’ later.
Image 5

Now hit control+shift+n once more to make a new track. In this new track, put your cursor just towards the end of sound in the first track, and click, dragging left to the beginning of this new track. Essentially, you’re selecting the blank area in the new track that corresponds to the ‘filled’ area in the first track. Confusing? Look at the pic below.
Image 6

Now click ‘Generate’ and then make a tone. You want 19000 HZ, Sine, 0.9 amplitude (generic, works for most controllers. Some vary slightly). The duration will be filled in from what you selected in the last step.
Image 7
Image 8

Combine the two tracks into a stereo track by clicking the little down arrow next to ‘Audio Track’ in the track on top and clicking ‘Make Stereo Track’. (This is just to make the next step easier on you).
Image 9

Now starting from the beginning, select the areas that are not part of the ’spikes’, and silence (control+L) those. Look at the pictures below for guidance. If you need to, zoom in more by clicking the magnifying glass in the top right corner with a plus symbol in it. The pictures below I zoomed in a bit on. Be sure to silence the tail-end as well!
Image 10
Image 11
Image 12
Image 13

Almost done! We more or less have our signal. Click the down arrow again like you did earlier, and click ‘Split Stereo Track’.
Image 14

Now delete the first, original track with the ’squarish’ signal, leaving just the generated tone track.
Image 15

control+shift+n to make a new track. Select all of the audio you just created in the track on top, hit control + c to copy, then put your cursor in the second audio track and hit control + v to paste it there.
Image 16

Now select all the audio in the second track (the track on bottom you just created).
Image 17

Click Effects, and click Invert.
Image 18

Combine the two into a stereo track, same way you did it earlier.
Image 19

You’re done. Now click File — Export.
Image 20

Skip the first dialog box by hitting OK. Save it as a WAV signed 16 bit (see pic).
Image 21

You’ve just made an IR signal you’re computer can play back (with the proper hardware ;D).


May 8th, 2009 |



What is USURP?

USURP No Comments »

USURP is the Ultimate Sage Universal Remote Project.

(It was originally just going to be SURP, but I found a billion search results referring to ‘Summer Undergraduate Research Program’ for SURP, so I wanted to avoid it)

This project has several purposes:
1) To turn your laptop into a universal remote control.
2) To give college students a fun project for the summer.
3) To build a community of people dedicated to understanding and manipulating IR signals.

What do I need to make it work?
1) a Laptop with Windows XP (other OS’s to be supported soon)
2) Audacity 1.3.x (optional - only for adding your own remote)
3) AutoHotKey (optional - only for adding your own remote in style)
4) A way to input/output IR signals from your laptop.

There are several ways to accomplish item number 4. We’ll be discussing the easiest way of doing it ($10 in parts from radioshack, a soldering gun, and the ability to follow directions) in the next post.


May 7th, 2009 |



Audacity Plug-ins in Nyquist/LISP

LISP No Comments »

Just storing these here for archival purposes. These are version 1 of the SAGE plugins for Audacity. More info on this project soon.

[ Download ]


May 6th, 2009 |



Teamwork

Quotations No Comments »

“Teamwork is essential. It allows you to blame someone else.”
-Unknown


May 5th, 2009 |



Previous Entries
  • Categories

    • -Personal (64)
      • My Comics (23)
      • Quotations (18)
      • Random (personal) (8)
      • Reflections (18)
    • -Programming/Coding (56)
      • AutoIt v3 (3)
      • c++ (4)
      • Javascript (3)
      • LISP (1)
      • My Programs (30)
      • Php (12)
      • Robotics (9)
      • Visual Basic (22)
    • If I were to run a… (2)
      • Church (1)
      • School (1)
    • Other (26)
      • Easter Eggs (4)
      • Funny Stuff (14)
      • Hacks/Tricks (7)
      • Random (Other) (1)
    • USURP (3)
  • Archives

    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
  • Recent Posts

    • MsComm Control
    • SB Shutdown Timer
    • A pistol and a toothbrush
    • Series of relationships.
    • XOR binary data in VB.NET
    • Importing IR signals with the help of some programs (~5 seconds per)
    • Importing IR signals manually (approx 30-60 seconds per)
    • What is USURP?
    • Audacity Plug-ins in Nyquist/LISP
    • Teamwork

Copyright © 2009 Teach The Net All Rights Reserved
RSS XHTML CSS Log in
Wp Theme by n Graphic Design
Powered by Wordpress