Posted: April 1st, 2011 | Filed under: Uncategorized | 0 Comments »
I’m currently authoring an AIR 2.5 application in HTML/CSS/JS and ran into some issues with @font-face embedding where no matter what I did the fonts would not load and render correctly despite trying both TTF and OTF versions. After that, I opted to try base64-encoding of the fonts for inclusion via a data url, since they are now supported in AIR. I’m running on OS X and have openssl installed, so I opted to run the following command, which I’ve used in the past for generated base64-encoded files for other Webkit-based projects and didn’t have any issues:
shell# openssl base64 -in UniversLTStd.otf -out Std
This produced a proper base64 file that worked perfectly in Safari, but when the same encoded file was inserted into CSS and launched in the AIR runtime, it resulted in the display of the default font. After ruminating a bit on the issue, I suspected that the line breaks produced by the openssl encoding were the issue, and not feeling particularly like removing line breaks by hand on 709 lines of code, I busted out the following:
shell# tr -d '\r\n' < Std > StdNoBreaks
I then used the output in the resulting file as the data url and it worked like a charm in the AIR runtime with the following CSS:
src: url("data:font/opentype;charset=utf-8;base64,[INSERT_BASE64_ENCODED_DATA_HERE]“);
Posted: May 30th, 2010 | Filed under: General Technology, Physical Computing, RFID, Schematic | 0 Comments »
I am pleased to announce that the Cannes Lions Touchwall 2009 captured the “Best integration with experiential/activity” award given out by MediaPost’s Digital Out of Home division. This is a satisfying validation of an experience that takes a technology for which very few practical applications exist (touchwalls) and augmented it with an unobtrusive form of authentication via RFID to provide a compelling, personalized informational and social experience for Cannes Lions Festival delegates.

For more details and the other winners, see MediaPost Digital Out-of-Home Awards
View project details
Posted: April 22nd, 2010 | Filed under: Uncategorized | 0 Comments »
A week after being a featured iPhone app in the Apple App Store, continued interest in what is arguably the most complex and robust e-commerce application in the App Store picks up another acknowledgement. It has now been featured as a Staff Pick, standing alongside some other amazing apps such as Tweetie 2, FlightTrack Pro, Brightkite and Moviefone.

Download the free FreshDirect iPhone app
View project details
Posted: March 27th, 2010 | Filed under: mongodb | Tags: hosting, mediatemple, mongodb | 0 Comments »
Due to a project that I’ve been working on that has some very specific software requirements I consolidated several separate boxes (from Joyent and MediaTemple’s Grid Service) to a new (dv) from MediaTemple for more flexibility. As part of that migration, I needed to get MongoDB setup on CentOS. The only RPM out there is for MongoDB is 1.2.2, (available here: http://chrislea.com/2010/02/07/mongodb-1-2-2-for-centos-5/). However, I quickly found out that with MT’s (dv), there are all sorts of depsolving issues with the Plesk psa packages and boost. So after all sorts of hell with yum, I decided to give the pre-compiled binaries a shot, and much to my dismay, they worked a treat with no fussing. I ran into further issues with installing the MongoDB PHP extension via pecl, but figured out how to work around those as well. In an effort to help out those that might run into this as well, here are instructions on how to get it running on an MT (dv).
Read the rest of this entry »
Posted: January 1st, 2010 | Filed under: Announcements | 0 Comments »
I am excited to announce that my new project for 2010 and beyond has launched. While not technology related, it represents the other passions that I hold near-and-dear: cooking and photography. The new year starts off properly with Black-Eyed Peas with Smoked Ham Hocks served alonside Collard Greens with Bacon and Red Onion. Be sure to check back often, as I cook nearly every night.

Visit knifeandpork.com
Posted: December 25th, 2009 | Filed under: Uncategorized | 1 Comment »

Happy Holidays from phy5ics!
Posted: November 6th, 2008 | Filed under: AS3, Bluetooth, GPS, Physical Computing, Python, Twisted | Tags: Python | 4 Comments »
Overview
After having built the hardware in Part 1, it is fairly useless without a way to get the GPS data from the device somewhere else in order to do something useful with it. For this project, the end result will be a visualization of the GPS data in Flash Player on a Mac. There are myriad ways to accomplish this, however very few approaches can easily encapsulate all of these steps in a single language. This is because both low-level system access (to read the serial data) and some sort of server (to serve the data to Flash Player) are required. While it is definitely possible to use any number of other languages such as Java, Processing, C++, etc., performing all of these tasks with those languages would require significant amounts of code.
With that said, I opted for Python not only because I love it, but also because it is quite straightforward to use it to read from a serial port using the pyserial module and also to establish any number of different types of servers including standard HTTP and socket servers. While there are built-in libraries for creating and managing servers, I ultimately decided on creating a socket server using Twisted. Twisted is an enormously powerful networking framework that simplifies the creation of all sorts of servers.
Why add another framework when a standard HTTP server would suffice for serving up data to the Flash Player? The implementation of a standard HTTP server would require Flash Player polling the service to determine if data had been updated. So, rather than rely on that sub-par solution, Twisted makes the creation of socket servers very easy, which then allows the Flash Player to receive data in real-time via an XMLSocket connection. Not only that, but one of the coolest aspects of Twisted is that it makes it fairly easy to write multi-user socket servers, which will be a nice addition for future enhancements
Here is what the overall system architecture ends up looking like when all of that is considered:

However, before diving into these details, the first step is to hook up the device to the Mac via a serial Bluetooth connection and verifying that everything is working so far.
Read the rest of this entry »
Posted: July 24th, 2008 | Filed under: Uncategorized | 2 Comments »
I greatly appreciate everyone’s comments and input on my article on Bluetooth and GPS
. It is quite nice to have the exposure from Make and also to have one’s efforts peer reviewed as it leads to productive introspection around one’s work.
Allow me to respond to those who took the time to comment on my little project:
To Tam, David and Snoopy:
No, I didn’t actually short out the entire board by connecting VCC+ and GND. That is a mistake in my first attempt to draw out a schematic in Illustrator. So to those that are copying this project word-for-word - please don’t follow the diagram exactly. I’ll update it in the next couple of days when I have a chance. As an aside, I’d be curious to hear from others about what they use for drawing circuit diagrams. I just use Illustrator because that’s what I know from my days long past as a designer.
To Siftah and Arto:
What I’ve done is most definitely available as a commercial product and most likely for less than I invested in the various components. However, I just happen to be a nerd and am quite interested in learning from products and devices that may exist for an equal or greater price.
Because I cobbled my project together from off-the-shelf components, I can continually break down and re-combine any of the components I utilized into more-and-more interesting and complicated projects. With a consumer product, I would be beholden to whatever the particular manufacturer of that consumer product dictated the functionality of a given device to be.
Additionally, while I’m not entirely familiar with what is on the market with regards to Bluetooth GPS devices, it’s much cooler, in my opinion, to be able to do whatever I want with the IMEA codes that I ingest and store from a piece of hardware via my own drivers and software as compared with what a GPS hardware/software vendor happens to expose via a crippled API in response to what their marketing team thinks that I might be interested in doing with said data that I collected via blood, sweat and tears on the trail. Isn’t that why we all read and love Make?
Birds have dominated the sky since the day that they evolved to become flying creatures. However, since man has gazed upon them, we have looked to them for inspiration and in envy, often (unsuccessfully) invoking their form in an attempt to share the currents and soar above. So, while I could theoretically transmute into a bird (or purchase one) to create an exact replica of something that already exists, by creating a reasonable facsimile I can learn how exactly it works, improve upon it and have fun doing it.
Posted: March 16th, 2008 | Filed under: AS3, Bluetooth, GPS, Physical Computing | 20 Comments »
Overview
For this project, my goal was to get GPS data into my Mac for some visualization experiments with ActionScript. After some initial prototypes that worked well using an RS232-to-USB converter, I decided that wasn’t slick enough and had it too many wires. I like things nice and clean around my desk, so I opted for adding Bluetooth in place of a USB converter.
After experimenting with some different methods, some using microprocessors and some not, I opted for the simpler route, eliminating the microprocessor. A microprocessor doesn’t add anything other than cost for the basic purpose of this project. Although stay tuned for another posting about integrating a similar configuration with the Make Controller and Arduino microprocessors.
Read the rest of this entry »
Posted: March 14th, 2008 | Filed under: General Technology, leopard | 0 Comments »
This may seem like a fairly outlandish edge case for external hard drives, but it’s one that I’ve run recently. Suppose you have an external Firewire drive connected to your MacBook Pro and then daisy-chained via Firewire to that, you have several more Firewire drives. Then suppose you’ve accidentally ejected that first drive that everything else is daisy-chained to. Then suppose that you’re currently in the middle of a render to one of the other down-stream drives and really need some files off of the drive that was unmounted. That removes the possibility of physically disconnecting the first drive to then reconnecting it to remount it, since the act of disconnecting would fubar the render.
Read the rest of this entry »
Posted: October 29th, 2007 | Filed under: RFID | 1 Comment »
I just returned from a trip to Japan and while in Tokyo I attended an exhibition at the Mori Art Museum that was simply amazing. The show was called Roppongi Crossing 2007: Future Beats in Japanese Contemporary Art and overall the artists that participated were fantastic, with most of them creating pieces specifically for the show. However, the exhibition included one piece in particular that stands out as the best artistic use of RFID that I have seen.
Read the rest of this entry »
Posted: October 13th, 2007 | Filed under: AIR, AS3, Flex, RFID, Web Services | 10 Comments »
I had originally wanted to build this project with my Parallax RFID reader, but since I can’t interface it with the Make Controller until Liam at MakingThings fixes the serial BLOB implementation fixed in mchelper 2.0, I decided to complete a proof-of-concept with a Phidgets RFID reader. The application is pretty straightforward - it consists of an RFID tag embedded in a cell phone that is read for its unique ID, prompts a user to enter some data and then remembers their personal data when they return. While the premise is simple, there are a few moving parts required to stitch it together.
Read the rest of this entry »
Posted: October 2nd, 2007 | Filed under: GPS, Make Controller | 2 Comments »
I’ve been attempting to hook up a serial GPS device to my Make Controller and read in data using OSC commands from mchelper prior to interfacing it with AS3 (as an aside, it’s really nice to be able to do this with the new version of mchelper). While I’ve been able to write to the serial port successfully using both /serial/char and /serial/block, reading from it always yields some sort of disaster.
Read the rest of this entry »
Posted: September 8th, 2007 | Filed under: AS3, Make Controller | 1 Comment »
MakingThings just released a bunch of software updates involved with Flash and the Make Controller that nullifies a lot of my previous work with AS3 and flosc. While some of the components still seem a bit buggy, they represent some major improvements. The best news to come out of this round of releases is that the flosc socket server can now be ditched (sorry, Ben Chun) in favor of connecting to the Make Controller using a new version of mchelper. Additionally it is now possible, from Flash, to connect to a board using either USB or Ethernet. As a result, I’m starting my series over to take these latest developments into account.
Read the rest of this entry »
Posted: August 21st, 2007 | Filed under: Flex, Web Services | 0 Comments »
On a project that I am currently working on, the team was having some issues consuming JBoss SOAP services. The root of the problem took a while to figure out, as apparently there are very few people that try to consume SOAP services experience the same issue we were encountering and The Google revealed few clues. At first we thought that perhaps the difference was between WSDL 1.1 and WSDL 2.0 and Flex’s lack of support for WSDL 2.0, as that is what the SOAP services were generating. After some initial investigation, we thought we eliminated that as a possibility. Then we discovered that the WSDL that we were consuming contained overloaded methods. Some reinvestigation at the W3C was done to see if perhaps a difference between the WSDL 1.1 or 2.0 specifications was support for WSDL overloading. It turns out the the specs are silent on this issue, so again we eliminated the difference in WSDL versions. Some additional searching after that determined that Flex definitely lacks support for WSDL overloading.
Read the rest of this entry »
Posted: August 20th, 2007 | Filed under: AS3, Make Controller | 8 Comments »
As those of you that have been reading along with the series might extrapolate, this post is supposed to be Part 5. However, given some things that I’ve discovered in the Fwiidom AS3 implementation as well as some issues in the MakingThings AS2 classes, which I then ported to AS3 and in the process propogated those bugs, this is now an update on some progress made with some collaboration and refactoring.
Read the rest of this entry »
Posted: August 14th, 2007 | Filed under: AS3, Flex | 4 Comments »
Use Case
I’ve been working on a project with a team of some of our really talented Flash developers (props Ben, Leon and Gabriel) where a Flex app being served from a non-secure URL via plain HTTP needs to connect to and consume data from another server via HTTPS and have run into some issues and a workaround that I’d like to share. For that particular project, the other server is a SOAP service running behind SSL with a Flex app served over HTTP consuming those services. However, these concepts also apply to any external data consumed by the Flash Player. A simplified diagram of the system is below:
Read the rest of this entry »
Posted: August 3rd, 2007 | Filed under: AS3, Make Controller | 0 Comments »
Doing Something “Useful” With Sensor Input
In Parts 1-3, we spent some time examining the basics of the Make Controller, OSC and how it works with (or in some cases doesn’t work) ActionScript 3. Now, we can start to do some things that might actually be construed as being useful for a project. To start, let’s get the hardware set up by hooking up a light sensor to analogin0. With that done, we can write some code to use the input from the light sensor as it detects ambient light levels to control the opacity of a sprite on the stage of our SWF.
Read the rest of this entry »
Posted: July 27th, 2007 | Filed under: AS3, Make Controller | 0 Comments »
Please be sure to read Part 2, and download the classes from that example otherwise the following example will not work as expected.
This article will cover how to read OSC messages that are sent from the Make Controller into FLOSC and then into Flash using the modified FWiidom classes. Before getting started, this is where I have to point out that the manner in which the Flash Player receives the XML converted from OSC is by polling FLOSC, which is far from ideal. Polling is an inefficient and wasteful way of checking to see if any state has changed on the controller. This, however, is the way that OSC works - by querying the connected device to determine if the state of any inputs has changed. I’m not sure if this characteristic applies to the Make Controller in general, if for example, using other protocols over USB, but I have a feeling that it doesn’t. I’ll have to look at some of the code written for the controller in other languages and also read up on OSC to determine if this is the case. In any case, we’re stuck with polling in ActionScript.
Read the rest of this entry »
Posted: July 26th, 2007 | Filed under: AS3, Make Controller | 1 Comment »
In attempting to wire up a slide potentiometer to the Make Controller and poll for its values using AS3, which was supposed to be Part 2 of this series of articles, I ran into a significant problem. (To understand what exactly I was trying to do, check out Getting Started with AS3 and the Make Controller - Part 3 - Determining Input Values.) After coding up my example for the article in AS3, I expected that when publishing the .SWF, everything would be working, right? No, of course not. That would be far too easy. After checking and double-checking my code thinking that I probably just did something stupid while working on it late at night, I was stumped. I slept on it and still couldn’t figure it out. After much frustration, I opted to revert back to AS2 to see if maybe there was an issue with the potentiometer and re-wrote the example using AS2 and the MakingThings AS2 classes and it worked a treat.
Read the rest of this entry »
Posted: July 22nd, 2007 | Filed under: AS3, Make Controller | 6 Comments »
A couple months back I picked up a Make Controller from Making Things to do some experimentation with Flash Media Server and physical computing. I’m just now getting around to writing up my experiences about getting set up with the Make Controller. While the tutorial on the Making Things site was great for getting started using AS2 with their .mxp extension, it didn’t offer up anything on how to get started with what I really wanted to do, which was a project that would benefit from the performance of AS3 and Flash Player 9, so I had to take matters into my own hands.
Read the rest of this entry »
Posted: July 21st, 2007 | Filed under: AIR | 0 Comments »
I gave a brief talk to the Schematic tech team here in LA on some of what I learned at the onAIR event earlier in the week. While I talked plenty about the new features of AIR from a variety of perspectives, I felt that the introduction of a technology like AIR required a different perspective and more time to explain it. An interesting aspect to the introduction of AIR is that is has significantly lowered the barrier to entry for developers interested in developing desktop applications. While this has the powerful effect of democratizing access to the desktop, it does raise some fundamental issues and fears.
Read the rest of this entry »
Posted: July 20th, 2007 | Filed under: Flex | 0 Comments »
I just attended Adobe’s on AIR Bus Tour the other day on its stop in Los Angeles. While typically those types of event don’t delve deep enough into details to be of much interest, I figured that I’d attend anyway since I’ve been away from the computer for so long on vacation and needed to catch up on some new stuff. The vast majority of the talks were JavaScript-centric which was interesting and perhaps highlights Adobe’s desire to sway over the current generation of standards- and open-source centric client-side developers to a proprietary technology, but more on that in another post.
Anyway, I had hopes of converting an app that I had been working on over to an AIR app for desktop deployment. The app that I was going to port over was a quick and rather silly app that I threw together using the Yahoo! Maps API and an geoRSS feed constructed using Yahoo! Pipes to filter earthquake data from the USGS. However, I quickly remembered that developing against an alpha release of anything can be tedious at best.
Read the rest of this entry »
Posted: July 19th, 2007 | Filed under: General Technology | 0 Comments »
The goal of this article is to relate several strategies and technologies to improve the efficiency in the collection, analysis and presentation of field data. I have limited the suggestions to only technologies that are free (but not necessarily open-source) and/or utilize public APIs so as to make them accessible to an audience who constantly finds their budgets diminishing. However, prior to getting into that, allow me to relate the context of some of these recommendations…
Read the rest of this entry »