Here is a program I did with Processing and the JMyron library. This is how you run it:
1. You need Java (download it if you don’t have it)
2. You need a webcam (only tested on mac with built in camera so far)
3. Double click sil_myron.jar
4. Click a piece of skin of average color (like your forehead)
5. Hit spacebar to subtract background
6. Hit ‘c’ key to change colors b/w blue and red
7. Hold ‘UP’ or ‘DOWN’ arrows to change the track color tolerance
A while back, in the good ole days of sticking it to Mark Zuckerberg, I came up with a concept I now call Facebook bombing (aka F-bombing). Basically, Facebook has it’s own little markup language in which you can use the ‘p’ tag to create a line break. I haven’t tried it yet, but I think you can insert this anywhere on your page. I originally started doing this in posts to people’s walls to make my messages look special and pretty. But then, I started thinking, how many of these can you fit in a post. Facebook posts have a character limit, but this tag doesn’t count as a character, so you can fit about 1000 of them. Thus the idea was born and I created the Longest Facebook Page group (which was actually a front competition to find a new way to insert iframes into pages). It was a huge disaster. Anyway, it still works, so if you want to do it, follow these instructions:
Choose a victim.
Go to this link and copy all the p’s by going to [ Edit - Select All ] on your browser’s menu and hitting ctrl+c (or apple+c).
Paste into the post box with ctrl+v (or apple+v).
Hit post.
Laugh at your friend’s expense.
Like I said, I could only fit 1000 of them but if you want to do some bounds testing yourself, here is the source C program to generate as many tags as you want. Keep in mind that this is harmless and they can easily delete your post but for the time it is there, it is funny. One more thing, if you do this to my page, prepare to be Facebook H-bombed.
I was looking at this link on the todbot blog. It is a utility C program that sends some serial data to your Arduino. I decided to customize this concept for my own use and also to make it a little simpler to read, use, or re-use. I was going to write this in C mostly b/c I wanted the user to be able to use UNIX pipes to send data over the line and I wanted it to be as little terminal typing as possible. Here is the desired result for the user’s CLI experience:
$ arduino-serial < data.txt
and not something like this:
$ python arduino-serial.py -b 9600
-p /usr/dev/tty.usbserial-A4000QZG
-f /usr/ben/Documents/data.txt
# you get the idea
So, like I was saying, I originally thought I should do this in C; but, then I realized I could easily achieve these results and have a much shorter program even if I used python. Here is the program in tarred and gzipped. I’m not really going to explain how the program works b/c it is so simple, but I will explain how I put it together.
**Before I get started, you should know that I created this for my MacBook Pro (OS X 10.4.11, Python 2.5) and this program should work with most BSDish systems but probably not Windows. Also, you need pyserial. Download it and do the usual install commands after you unarchive it:
$ python setup.py build
$ python setup.py install
Moving on now…..
First, I created a symlink to the arduino serial port called usbserial.arduino by opening up my Terminal application and dropping in this:
This assumes, of course, you are currently in the directory that contains the arduino-serial.py file. Keep in mind that this also strips off the .py extension. I think as long as you have the correct shebang in there “#!/usr/bin/env python”, you should be fine. Now you have to give the file the proper permissions:
$ chmod 755 /usr/bin/arduino-serial
After this, everything should be running swimmingly. You can just send an ASCII text file byte by byte doing something like show above:
$ arduino-serial < data.txt
You can run this from any directory in your terminal because the program was put in “/usr/bin/”. You can verify its status as a global program by typing:
$ which arduino-serial
There are a few ways to use this program:
You can use the ‘-b’ option to set the baud rate. If you don’t enter this option, it is default=9600. This is a common baud rate for me but if you have a different preference, you can change this in the program in the ‘default’ parameter of this function:
There is also the -d option for ‘data’. You can use that to send just one character or sequence of characters.
In conclusion, this could probably best be used to test your serial reading code on your arduino or maybe even send it configuration files or possibly hex binaries.
After the Virginia Tech incident, LSU decided to get a mass text-messaging system to be used in case of a campus emergency. Very recently, during finals, two graduate students were murdered right off of campus and although LSU tried to put the campus on alert, the text messaging system failed miserably. I don’t think one person got a single message. Not to say that this is necessarily LSU’s fault (or Microsoft’s?). So, after thinking about it for a while, I wondered how hard it would really be to make a script that automates sending text-messages. What I came up with probably couldn’t be used for a lot of text-messages in a short period of time, but I am sure it will work well for applications like sending a text to everyone in a group, class, co-workers, small groups of personal associates, etc. Here is the python file tarred and gzipped.
First, you are going to need 2 things, a gMail account and libgmail. Getting a gMail account is self-explanatory, to get libgmail, go to the project page here and download the archive. It is a standard install, just un-archive it and open up your terminal. CD to the directory and run:
$ python setup.py build
$ python setup.py install
Then open up IDLE, or run your python interpreter, and enter:
import libgmail
If this continues without a fuss, the install was a success. So now let’s take a look at what my code does.
The first thing you need to do is import this module into your file:
from TextMessaging import *
There are 3 types in TextMessaging.py. The first type is Sender. Always create a sender first:
sender = Sender(gName, gPass)
gName is your email address as a string (“uName@gmail.com”) and password is a string version of your password. The sender object sets up an SMTP server through which your messages are sent. Keep in mind that the return address on the text-message will be the email account you are using. After you have a sender, you can create Receiver and TextMessage objects to manage. To create a TextMessage, use this form:
txtM = TextMessage(subject, body)
where subject is the string subject and body is the string body. Use the ‘\n’ character to to create new-lines or read this string from a file. To create a Receiver, use this form:
receiver = Receiver(p_num, carr)
where p_num can be an integer or a string. It should be 10 digits. The carr variable is a little specific. You need to know the carrier of the receiver’s phone plan. Here is the dictionary that defines which strings point to which servers:
Well, that is about it. If you are having trouble with the carriers, look here. Also, this code is a very simple abstract interface to libgmail and my respect goes out to them. It is so simple that it is hardly needed but maybe it will help a few of you trying to cut some corners. I guess next time I’ll discuss how to connect this to the Arduino. Oh, one more thing, if you want to test this out really quick, run this module as __main__ (by running in the terminal or IDLE) and the test program will allow you send a text-message to any number. As always, send me email if you have questions.