+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 15 of 28

Thread: My teamspeak radio project

  1. #1
    Registered User Wimpinator's Avatar
    Join Date
    Jan 2006
    Location
    United states, TN
    Age
    37
    Posts
    3,072

    My teamspeak radio project

    I have a pretty simple problem that I decided to design a fairly complex solution. I often forget to launch teamspeak when I get ready to play a game. Once I'm in game and realize I needed to launch Teamspeak then I have to minimize the game and launch teamspeak and sign in while praying that it doesn't crash my game. I thought it might be pretty cool to have a box that sits on my desk that allows me to control teamspeak through a hardware interface. Thus the "Teamspeak Radio" was born. I had an Arduino micro-controller that didn't have a purpose and a bunch of switches and an old ATX power supply chassis. The only thing I had to buy was an LCD. I wrote a script in python to talk to the Radio over the USB port and interface with Teamspeak.



    The switch on the bottom right will start or stop Teamspeak. The next switch from the right is the mute control. It allows me to mute the speakers and microphone with the flip of a switch.



    The LCD shows the channels. The python script gets a list of all of the available channels and spits it out to the Arduino board. The paddle switch on the left allows me to toggle between all of the channels. The red button above the paddle switch joins the selected channel.



    And finally here is inside the radio.

    There are a few things that still need to be done. I need to add a couple of LEDs to show the mute status as well as an LED to show that the Radio is communicating with Teamspeak. The chassis still needs to be sanded and painted a nice Olive Drab as well as gaps filled and general cosmetic work. I also need to add a knob to the pot that controls the LCD contrast. The hardware was inspired by this picture:

    http://www.tactical-link.com/vvc1099.jpg


    Now you know why I was mysteriously connecting and disconnecting from teamspeak. Testing was a pain.


  2. #2
    Drizzid's Avatar
    Join Date
    Oct 2005
    Location
    Glendale, AZ
    Age
    38
    Posts
    3,003

    Re: My teamspeak radio project

    Bravo on the engineering Wimp but man you have too much free time on your hands

    But seriously nice work!


  3. #3
    freekyE's Avatar
    Join Date
    Aug 2005
    Location
    indiana
    Posts
    1,006

    Re: My teamspeak radio project

    Very, VERY cool wimp.

    If you had to guess what would something like this cost to build from scratch?



  4.  
  5. #4
    Registered User Wimpinator's Avatar
    Join Date
    Jan 2006
    Location
    United states, TN
    Age
    37
    Posts
    3,072

    Re: My teamspeak radio project

    I would guess $15 for switches, $2 for pot, $15 for the LCD, $35 for Arduino board and $10 for the transistors and resistors for the interface board. So a guestimate of $77 not counting the chassis. Geeze this thing was more expensive than I thought.

    The software for the Arduino board was cobbled together from a few open source projects. I haven't posted the code because I don't have it all commented with credits yet.


  6. #5
    freekyE's Avatar
    Join Date
    Aug 2005
    Location
    indiana
    Posts
    1,006

    Re: My teamspeak radio project

    is there a way to use a different (cheaper) board?


  7. #6
    marstein's Avatar
    Join Date
    Jul 2005
    Location
    Half Moon Bay, CA, USA
    Age
    44
    Posts
    879

    Re: My teamspeak radio project

    This is super cool. Did you think about publishing this to, like, make magazine?
    Gigabyte P35-DS3R, 2GB, 8800GTS 640MB, Core2Duo E8400



  8.  
  9. #7
    Registered User Wimpinator's Avatar
    Join Date
    Jan 2006
    Location
    United states, TN
    Age
    37
    Posts
    3,072

    Re: My teamspeak radio project

    Sure you could probably knock a few dollars off the board by going with a standard micro-controller and building a custom board. That's a pretty slippery slope because there end up being a lot of hidden costs such as a programmer. You could probably find something for under $30 but I haven't looked into these things in a while so it's just a guess.


  10. #8
    Registered User Wimpinator's Avatar
    Join Date
    Jan 2006
    Location
    United states, TN
    Age
    37
    Posts
    3,072

    Re: My teamspeak radio project

    Quote Originally Posted by marstein View Post
    This is super cool. Did you think about publishing this to, like, make magazine?
    I may do that but I wanted my TG peeps to get a first look.
    Last edited by Wimpinator; 01-06-2007 at 03:56 AM.


  11. #9
    Registered User Wimpinator's Avatar
    Join Date
    Jan 2006
    Location
    United states, TN
    Age
    37
    Posts
    3,072

    Re: My teamspeak radio project

    BTW the handles on the front are cheap plastic drawer pulls from Home Depot.



  12.  
  13. #10
    Registered User Wimpinator's Avatar
    Join Date
    Jan 2006
    Location
    United states, TN
    Age
    37
    Posts
    3,072

    Re: My teamspeak radio project

    This is the schematic for the interface board



  14. #11
    Registered User Wimpinator's Avatar
    Join Date
    Jan 2006
    Location
    United states, TN
    Age
    37
    Posts
    3,072

    Re: My teamspeak radio project

    The python script (yes I know it is far from optimized):

    Code:
    ## Teamspeak Radio Interface
    ## Copyleft Jesse Merritt
    ## Distribute freely without modifying this header
    ##
    ## Visit www.tacticalgamer.com
    ## The PREMIER online community for mature gamers
    ##
    ##
    ## The PYSERIAL module is required for this script
    ## http://pyserial.sourceforge.net/
    
    
    #  Imports modules and definse name spaces
    import serial
    import os
    import time
    
    newbyte = ""
    muted = 0
    unmuted = 1
    quit = 1
    start = 1
    running = 0
    channel = 0
    line_count = 0
    channels = []
    names = []
    name_stripped = []
    id = []
    
    ## Setup the serial port
    ser = serial.Serial(2)
    
    ## Main loop
    while 1:
        byte = ser.read()       #Reads a byte from the serial port
        
        if byte == "m" and running == 1 :        # Mutes Teamspeak
            if muted == 1:            
                os.system("tscontrol.exe MUTE")            
                muted = 0
                unmuted = 1
                print "Muting:   " + byte
                
        if byte == "u" and running == 1 :     # Unmutes Teamspeak  
            if unmuted == 1 :                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
                os.system("tscontrol.exe UNMUTE")
                unmuted = 0
                muted = 1
                print "unmuting:   " + byte         
            
        if byte == "q" and running == 1:        #Quits Teamspeak
            if quit == 1:
                chan_list.close()
                print "stopping"
                os.system("tscontrol.exe QUIT")            
                os.system("rm chan_temp.txt")
                quit = 0
                start = 1
                running = 0
                ser.write("Not Connected")          
                
    
        if byte == "s" :                        #Starts teamspeak and signs on to a designated server
            if start == 1:
                channel = 0
                # change the line below to include the correct login name and password
                os.system("start teamspeak://67.19.106.94:8767/?nickname=your_name??password=your_pass?Channel=Main")
                quit = 1
                start = 0
                running = 1
                time.sleep(5)
                print "starting"
                os.system("tscontrol get_channels >> chan_temp.txt")    #Gets all channels
                chan_list = open("chan_temp.txt", "r")                  #Writes channels to a temp file
                ser.write("Main            ")                           #Writes main channel to LCD
                
                for line in chan_list.readlines() :                     #Parses temp file
                    line_count = line_count + 1
                    id_list = line.split(" ")
                    if line_count > 2 :                                 #The 1st 2 lines are garbage so skip them                
                        id.append(id_list[1])                           #Add the channels to a list
                        parsed = line.split(":")
                        names.append(parsed[3])                        
                    
                for s in names :                                        #Create another list of channels with useless stuff removed                                       
                    split = s.split("  ")                    
                    if split != "Playercount" :
                        name_stripped.append(split[0])                    
                length = len(id)
                end = length - 1
                
        line_count = 0           
    
        if byte == "+" and running == 1:        #Channel up
            channel = channel + 1
            if channel == length :
                channel = 0
                
            ser.write(name_stripped[channel])    #Write the channel name to the LCD
            print name_stripped[channel]        
            
            
        if byte == "-" and running == 1:        #Channel Down
            channel = channel - 1
            if channel == -1 :
                channel = end          
            print name_stripped[channel]        
            ser.write(name_stripped[channel])   #Write the channel name to the LCD
    
        if byte == "e" and running == 1:        #Enter buttom
            move = (id[channel])
            os.system("tscontrol SWITCH_CHANNEL " + str(move))  #Switch to selected channel when pressed


  15. #12
    Root's Avatar
    Join Date
    Dec 2004
    Location
    South east england
    Posts
    8,835

    Re: My teamspeak radio project

    Quote Originally Posted by Wimpinator View Post
    The python script (yes I know it is far from optimized):
    We have some python guys kicking around, that might take a look at the code and optimize it.
    BFCL TF2 league admin



  16.  
  17. #13

    Join Date
    Jul 2005
    Posts
    4,492

    Re: My teamspeak radio project

    Digg it!
    Battlefield Admin(BF2 Rules) (BF2142 Rules)
    [volun2][medic][defense3][eng2][support]
    [sg-c1][gchq-c1][tog-c1][ma-c1][taw-c1][tg-c2]
    Support TG | Write for TacticalWiki | BF2 Sig. Generator | TS Help


  18. #14
    Obi
    Obi is offline
    Obi's Avatar
    Join Date
    Jul 2005
    Location
    Scotland
    Age
    21
    Posts
    2,143

    Re: My teamspeak radio project

    Consider yourself Digged. (Dug?)


  19. #15
    icky's Avatar
    Join Date
    Jul 2005
    Location
    Ottawa Valley
    Posts
    6,153

    Re: My teamspeak radio project

    Quote Originally Posted by Root View Post
    We have some python guys kicking around, that might take a look at the code and optimize it.
    Well it really doesn't need any optimization. Speed is not an issue with code like this. I would only change it to use more obvious variable names.

    And I would make it more like a state machine, with state = RUNNING and such.
    Peace through fear... since 1947!



  20.  
  

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. SOP (Radio) - The Radio Check
    By Apophis in forum Operation Flashpoint - Announcements and SOP's
    Replies: 0
    Last Post: 08-31-2005, 03:52 PM
  2. SOP (Radio) - The Contact Report
    By Badger in forum Ghost Recon - Official Rules, Announcements and SOP's
    Replies: 0
    Last Post: 05-15-2003, 02:24 PM
  3. SOP (Radio) - The Fire Mission
    By Badger in forum Ghost Recon - Official Rules, Announcements and SOP's
    Replies: 0
    Last Post: 05-15-2003, 02:22 PM
  4. SOP (Leadership) - S.M.E.A.C.
    By Badger in forum Ghost Recon - Official Rules, Announcements and SOP's
    Replies: 0
    Last Post: 05-15-2003, 02:19 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts