Posted 1 week ago

Kinect Controlled Vacuum Source Code

Dumping off the source code for the project as usual. Ignore the lack of documentation. Dropbox has a built in text viewer so you can check it out without even downloading!

Create.py - module that actually controls the robot

Kinect.py - sets up skeleton tracking and displays camera view for Kinect, also does basic gesture control

Posted 1 month ago

Kinect controlled iRobot Create

Posted 6 months ago

[Android] Secret Santa [1.5]

It’s been almost a year since I posted the first version of my Secret Santa app made using the App Inventor. Since then, Google has dropped support for the App Inventor and I’ve been working on a few other things. Now that it’s getting to be that time of the year again, I thought I would finish it up. I ran into a few issues with my work being corrupted, but I managed to rally back.

This new version features a slightly new design, using the color scheme of an Ice Cream Sandwich app and a few more things listed below.

Features

  • Add members to a list of Secret Santas
  • Automatic mix and match for picking out Santas
  • Discreet batch text all members telling them who they should get a gift for

Download

Installation:

  1. Download and save to your SD card (or just email it to yourself)
  2. On the homescreens, press Menu > Settings > Applications > Check “Unknown Sources”
  3. Using some file manager, find “SecretSanta.apk” on your SD card and run the file
  4. Let it install

Changelog

  • Ice Cream Sandwich color scheme
  • New icon that isn’t my face
  • Working mix and match algorithm this time around!
  • Renamed buttons to be friendlier, less robotic
  • Added confirmation dialogue for the clear button
  • Appropriately disable “Text members” button
    Posted 9 months ago

    [Android] Separation of hardware and software

    After a year of fiddling with Android, I’ve had my fair share of great experiences and annoyances. In this time, I’ve found that ugly applications and poor design can be a bit frustrating, but there is nothing that grinds my gears like the hardware/capacitive buttons.

    Problem

    When opening a notification (ex. a text message), it opens up an activity that shows the appropriate text message. However, if you want to get back to the list of conversations, there is no easy way to do it.

    Hitting the home button will take you back to your launcher, but you have to re-open the messaging app, only to find out that it opens right back up to that same text message. If, instead, you decide to hit the back button, then it will close out of that activity and the entire application. Only now that the application is closed will it open to the list of applications. Either way, it takes at least 2 steps to view something within the same app, when it should be a simple one click back.

    Proposal

    Nexus S with only home and back buttons

    Mockup Nexus S with home and back  buttons

    Have only the home and back buttons, and make it so that the buttons on your phone will only operate on a very high OS level. The home button should take you back to the launcher and holding down the home button should bring up voice actions. The back button should allow you to traverse through your recent apps one by one and holding down the back button should bring up a sort of list of recent apps. If an app needs navigation options, then for Christ’s sake, build it into the app.

    The menu button shouldn’t exist since it isn’t clear if the app has a menu in the first place and because it hides (usually) important functionality from the user. It’s not very difficult: If an app has a menu, place a simple “gear” button somewhere on the screen that will take you to the menu.

    Similarly, the search button should become a conditional software button. If an app requires a search function somewhere within it, then it should put it there on its own.

    Removal of these buttons will not only make the device aesthetics a little bit cleaner, but will also make it clearer what their jobs are. The home button will be associated with launching applications, either through the launcher or through voice actions, and the back button will be associated with multitasking.

    Conclusion

    By borrowing some of the smart design cues from iOS and WP7, we should able to tame the wild west of software known as Android . Granted, without an app approval system, this can’t be enforced easily, but if developers are no longer given the option of using those buttons, then progress should be much quicker. And while the removal of these buttons will certainly cause outcry in the community, I believe it will be beneficial to both users and developers to have a more informative and better thought-out design.

    Posted 11 months ago

    [Java] Tumblr in CLI

    Sorry for the delay, but at least I’m finally putting this out! This is a program, written in Java, that will let you post to Tumblr from a command line interface. After stumbling into the Tumblr API, I couldn’t resist starting this project. Although I was practically done three weeks ago, there was one feature that was giving me trouble until now.

    Unfortunately, I did not use the application to write this post :(

    Download

    Instuctions:

    1. Download the zip and extract the files
    2. Compile the files (javac *.java)
    3. Run the application (java Tumblr)
    4. Follow the instructions and begin posting!

    Notes:

    • Strictly to create posts, no option to view other posts
    • Cannot upload your own pictures/music/videos
    • This, in no way, is a practical method to post to Tumblr

    Oh btw:

    Posted 1 year ago

    [Java] Rock Band score lister

    A Java port of the Rock Band program made by Andrew (originally written in Perl). It takes arguments for a song, instrument, platform, and number and spits out the top scores (dictated by number) for the song.

    Download

    Instructions:

    1. Download the source file above
    2. Compile it (javac RockBand.java)
    3. Run it with or without command line arguments (java RockBand [platform] [song name] [instrument] [number])

    Arguments:

    Notes:

    • Experimental user look up is commented out in the source. Uncomment it to enable, but it is very slow
    Posted 1 year ago

    Modifications made to WP7 Swiftkey skin by sonnysekhon

    • Green key press highlight
    • Green key press popup
    • Included WP7 sounds! (Modified slightly to be quieter)
    • Blue version included too

    Instructions are in the thread

    Graphics credit goes to sonnysekhon (here)
    Sound credits go frostincredible (here)

    Download (green)

    Download (blue)

    Originally posted April 27, 2011

    Posted 1 year ago

    [Java] Anagrammer! [2.0.1]

    The latest version of Anagrammer has some major changes under the hood and a few changes to a few user facing features.

    Download

    Instructions:

    1. Download the zip and open it up
    2. Drag the Anagrammer folder in it to the desktop
    3. Open up terminal or the command prompt and change the directory to the desktop. Run command “cd Desktop” then “cd Anagrammer”
    4. Run command “javac *.java” then “java Anagrammer”
    5. Have a ball

    Changelog

    • [2.0.1] Fixed an oversight when using counting method for words multiple instances of a character
    • [2.0] Can now solve anagrams for any length word!
    • [2.0] Doubly massively improved performance, time complexity is now O(n), any word should take no longer than a second
    • [2.0] Completely new method for solving anagrams, one using a HashMap and one counting letters
    • [2.0] Only using 1 source file, no need for the other one anymore
    • [1.1] Massively improved performance; now takes less than 5 seconds in most cases (even 9 characters)
    • [1.1] Text files placed into subdirectories (only works with non-jar version)
    • [1.0] It’s not the most efficient way to do this, but it gets it done fairly quickly for being a factorial amount of operations
    • [1.0] Knows most words (~250,000) but not all
    • [1.0] 9 character words take a long time [Fixed 1.1]

    How it works:

    HashMap: Takes the user input and alphabetizes all of the letters so “car” would become “acr”. It uses that alphabetized string as the key for the HashMap and puts the word “car” into the ArrayList used for the value.

    Counting: It’s a pretty simple concept; it takes user input and reads through a bunch of dictionaries. If we are looking through a dictionary of words with length 4, then a “sub-anagram” should contain 4 letters from the user input string.

    eg. The word “row” would need to contain 3 letters from “grown” to count as a sub-anagram (which it does). For it to be a full anagram, the word would need to  contain all 5 letters from “grown”.

    Originally posted April 21, 2011

    Posted 1 year ago

    [Java] Anagrammer! [1.1]

    Or what some may call… Words with Friends cheat

    Regular full word descramble (I guess it should be unscramble)

    Words with Friends mode

    This program is an idea that Riley came up with a really long time ago. The basic idea is to send it a scrambled set of letters and hopefully have it spit out a word. Sure, there are plenty out there, but none like this, and none made my me. I decided to take on the project but because of my lack of foresight, it would not work on words with more than 9 characters. Being as clever as I am, I quickly turned my program’s design flaw and turned it into its greatest strength!

    Download (Windows)

    Download (Mac/Linux)

    Instructions:

    1. Download the appropriate zip file above and open it up
    2. Drag the Anagrammer folder in it to the desktop
    3. Open up terminal or the command prompt and change the directory to the desktop. On Mac/Linux, “cd Desktop/Anagrammer”; on Windows, “cd Desktop\Anagrammer” (different slashes)
    4. Type “java Anagrammer” (If it doesn’t work, try javac *.java first)
    5. Have a ball

    Changelog:

    • [1.0] It’s not the most efficient way to do this, but it gets it done fairly quickly for being a factorial amount of operations
    • [1.0] Knows most words (~250,000) but not all
    • [1.0] 9 character words take a long time
    • [1.1] Massively improved performance; now takes less than 5 seconds in most cases (even 9 characters)
    • [1.1] Text files placed into subdirectories (only works with non-jar version)

    How it works:

    Bare with me here, the method is a bit obscure. I will be using “abcde” for all examples

    The basic idea behind it is the use of numbers with unique digits (eg. 13452, 24135, etc). What the program does first is take your scrambled letters and takes the length of it so in the case of “abcde”, length = 5. Then from there, it starts counting from 10^5 all the way to (10^6) - 1 (in the case of WWF mode, it counts from 0 to (10^6) - 1) and computes all the numbers with unique digits and does not contain any numbers > 5 (you’ll see why later) and writes them to a text file so it can reuse them later. No need to reinvent the wheel.

    Now with all the numbers computed, we positionally map the original scrambled letters to each unique digit in each number. The original “abcde” would look something like this “12345”. For “12354”, we have “abced”, and for “12543”, we have “abedc”, so on and so forth. As mentioned earlier, we cannot have any numbers greater than the scrambled letters’ length and that is because of the mapping. “abcde” mapped to “12456” could not work because there is no 6th character in “abcde”. Same goes for any number > 6.

    Now to the easy part: once we’ve mapped all the letters to all the numbers with unique digits, we just check to see if any the mappings are real words and then print them out so the user can see it.

    Originally posted March 13, 2011

    Posted 1 year ago

    [Android] Note taking application, rough drafts

    So this is my “surprise.” I’ve been drawing up designs for a note taking application for Android for the last few days. Maybe I’ll actually end up pursuing this project, maybe not.

    Features so far:

    • Pen mode, colors
    • Highlighter mode, colors
    • Eraser mode
    • Cut mode
    • Copy mode
    • Tagging sections of notes, ability to filter notes by tags
    • Lookbacks, like a bookmark, but can set an alarm to remind you about it at a specific time, or after a certain amount of time
    • Breadcrumb address bar with scrollable page numbers
    • Awesome page skimming
    • Simple cut/copy/paste, cut/copy/paste between pages by leaving your selection on the right edge

    Above is the main UI for taking notes.

    • Tags are the boxes around the notes, it will most likely be a dotted line rather than solid and will fade away after a few seconds. 
    • Action bar at the top gives you option of modes, pen, highlighter, etc.
    • Second bar acts like an address bar, allows you to navigate through your notebook in various ways

    A rough drawing of the method for skimming through pages. Zooms out of the notebook and allows user to see multiple pages at a time. You slide your finger horizontally to page through the notebook.

    More later…

    Originally posted March 4, 2011