01 December 2015
The DMV needs no introduction; you don't need to be convinced that the DMV website is a hassle. This project exists because the DMV exists. I developed the California DMV Poller over the summer when trying to book an appointment at the DMV for someone. All appointments were booked 2-3 months in advance at my local DMV office, and I decided to do something about it. Why use this? Multiple DMVs You want to check schedules at multiple DMVs. The...
20 December 2014
Sticky Hover I recently ran into an obnoxious problem on my IR Controller Webapp. When you tap on an element on a mobile device, it stays in a :hover state until you tap elsewhere. Failed Attempts I tried quite a few things to fix this problem, but it was more difficult than I'd imagined. Sadly, I spent a pretty long time trying to figure this anomaly out. Blurring element focus and focusing another element At first, I thought that the...
25 November 2014
Although the Internet of Things is relatively new, controlling devices remotely is as old as sin; devices have been using IR remotes for ages. There is a lot of untapped potential from the infrared devices sitting in your home. Besides the raspberry pi, you can get all of the materials for this project at your local electronics store or radioshack. To unlock this potential you need the following parts: A raspberry pi (Any model OK) A PNP Transistor One infrared...
27 July 2013
Making a résumé in Microsoft Word felt really generic and boring to me. I tried LaTeX with mixed results, and then I realized that I already know a markup language: HTML. An example of an HTML/CSS résumé that we will cover in this post can be seen here, as a shameless plug for my own résumé. Setting up your page You may be thinking at this point, html isn’t for making documents. If you have seen my previous post, Dynamically Generating a Word Document; PHP Flash Card Generator, you would already know that there are methods in HTML/CSS to format a document for printing. Let’s make some decisions about the formatting of my page. I am going to be printing on letter paper which is 8.5in x 11in, and I want half inch margins. When viewing the page on the computer, I want it to be over a non-plain dark...
13 June 2013
I had to study for a midterm a few weeks ago, and thought to myself — I should really make myself some flashcards to memorize all of these acronyms. So, I got on the computer, opened up a word processor, immediately got bored and decided to make myself a program that does it for me. Why PHP? So I can share it! It also searches wikipedia if you don’t specify a definition. Check it out here: http://www.mvartan.com/doc/ My first concern was, naturally, how in the world do you dynamically generate a word document? To my surprise, it is ridiculously easy to generate word documents, if you already know web development! A .doc file can be just a html file with a modified file extension. There are a few caveats however. Firstly, you get a somewhat limited repertoire of CSS that will work correctly. Secondly, you have to add a few...
02 April 2013
The other week a professor gave me ”Omega multidimensional effect” Christmas lights and challenged me to figure them out to control them. Under the impression that each LED was individually controllable, I took up the challenge looking to convert them into an LED matrix/display. Unfortunately, the lights aren’t as complex as I’d hoped. But in reverse engineering the lights, I came up with a very useful serial pin controller that I have used a few times since, and want to share with you all. It allowed me to type a string of bits such as “00011110″, turning pins 2,3,4,8 on and 5,6,7 off. Christmas Lights I was pretty excited to have these Christmas lights, hoping to use them as some sort of display. The professor was under the impression that each ‘stick’ of LEDs was individually controllable. When I cracked up the controller box, I found an old microcontroller and...
11 March 2013
A little known fact about LEDs (Light Emitting Diodes) is that when hooked up backwards, they act as photodiodes. I have manipulated this property to make a few fun and cheap Arduino projects, including a musical instrument I call a photo-theremin. I am going to begin with my understanding of physically how this works. Bear with me -- my 4th grade teacher once told my mother that she was certain I’d never be an artist, and it shows in my drawings. If you’re not interested in exactly how it works, feel free to scroll past my crude diagrams. If you’re just interested in the photo-theremin, you will find it at the bottom of this post. Physics Hooked up 'correctly' This my very simplified way of thinking of diodes, if you want a better and accurate explanation, I suggest looking at this article on HowStuffWorks. My understanding is that particles there...
08 March 2013
I began by taking a power supply and running 10mA across each possible combination of the twelve pins. Since they are diodes, it mattered which direction the current flows, so there is, I believe, 12^2*2=288 possible combinations. Anyways, I eventually found what pin combinations light up what LEDs, and the trend was, each row corresponds to a pin connected to ground, and each column corresponds to a pin connected to the power source. I lost the original document, but this is the new one I sketched up that (each pin corresponds to a number on a breadboard) The first thing I did was display a static image on the matrix, which I unfortunately didn’t take a photo of. I learned that you must draw one column or row at a time, if you do not want to draw an image that is mirrored around the center LED. After I promptly...
13 February 2013
I just remembered a small project I had in 2011 that I wanted to share with you guys. I had just bought a webcam, and also gotten a cat, and decided to combine the two with programming to make this, a webcam viewer. This way, I could see what my cat was doing while I wasn't home, by checking the website on my phone.
Things you'll need:
VideoCapture Plugin (Link) and its dependency, PIL (Link)
A Webserver equipped with PHP.
PHP code: (index.php)
exec('python capture.py'); //if you get any errors, check your environment variables
$fp = fopen("log.log", "a");
fwrite($fp, date("F j, Y, g:i a")."\r\n");
<html><body><img src="image.jpg" /></body></html>
Python Code: (capture.py)
from VideoCapture import Device
Device().saveSnapshot('image.jpg', timestamp=3, boldfont=1, quality=70)
10 February 2013
A headless raspberry pi is a raspberry pi that is not hooked up to a monitor, a keyboard, or a mouse. It is pretty easy to set a raspberry pi up and then remove the peripherals, but this guide is for those who do not want to take their setups apart to set up their raspberry pi. Things you will need A Raspberry Pi. They should sell as low as $35 on some websites, but if you need it quickly, it will be in stock at amazon. Make sure to have a Micro-USB cable and USB power adapter handy as well. An SD Card. I recommend getting a Class 10 SD Card for the fastest speeds. The small ones go for as little as 5 dollars. SSH. If you are using Windows, I recommend using PuTTy. You can also SSH using apps on your smartphone or tablet. A VNC viewer/client....