Approving Eye-Fi Facebook Uploads

I got a Eye-Fi Wifi SD Card for Christmas. It works great on my Canon 5d3 and gives me the wifi uploading that Canon should have baked in from the start (they added it into the cheaper 6d, ugh!). It can upload to a number of online services, including Facebook. I set it up and had it working for the first few uploads, but after that it stopped posting to Facebook. Everything showed up fine in the online Eye-Fi gallery, but nothing went to Facebook.

They are a couple of things you might have to check to get it working. First, make sure the privacy/sharing for the album you are uploading to is set to atleast Friends. Also check the Album, I had a bunch of photos I had to “Approve” because they were uploaded by an App. Hopefully that goes away after I approve it a couple of times. Then goto your settings, then Apps, and then the Eye-Fi App and make sure its privacy/sharing is set to atleast Friends.

It is working flawlessly and it is so cool to be able to hit one button on my DSLR and have it automatically post to Facebook. It is even easier that on the iPhone. I remapped the Rating button to be Protect in order it make it super easy.

Linux Driver For Sure Electronics DE-DD22111

In addition to offering cool LED modules, Sure Electionics also offers a nice Demo / Driver board to go along with them. The only bummer is that the driver board needs a Windows Java program to run if you want to send text to it, to be displayed.

I did some backwards engineering and looked through the design documents, and was able to come up with a couple of Linux programs that let you display text using you computer. It is actually a really cool board and it looks like it is all based on a PIC microchip and could easily be reprogrammed. The PCB board has the traces for a clock, temperature sensor and wireless connection, so it was clearly meant to be added on to.

The board communicates with a computer over USB using a CP2102 USB to UART Bridge. The great is that most newer Linux kernels have driver support baked right in. That means that when you connect the board to your computer, it just shows up as a serial device.

To send Text to the board you need to send it through the serial port ( ttyUSB0 ). Before doing that you have to send the command for write mode. To send text to the first bank of up to 4 boards, you send “0xFE,0x47,0x01,0x01”, followed by 16 characters. You have to send 16 characters, even if you have less than 4 boards or else it goes screwy. All of the scrolling has to be done in your program and you simply change which 16 characters are currently being displayed.

I have my code up on GitHub

and here:

led.tar.gz

$100 Internet Enabled LED Message Board

The Raspberry Pi is a lot of fun to play with but I wanted to do something “useful” with it. The obvious solution was of course to connect something fun to it. I have always wanted to have a message board all to my own so I can display my wisdom and entertain my co-workers.

I could of course cough up a bunch of money and buy an assembled message board or just get a miniature “toy” version, but what fun would that be. Instead I decided to order the different components I needed to build my own.

Sure Electronics is a component manufacturer that sells straight from China. They have great prices and decent documentation. There are of course some rough edges on the documentation and demo code. They are not Spark Fun or Ada Fruit, but neither are their prices.

They sell a number of different LED Matrix. The big differences seem to be the number of LEDs, the size of the LEDs and whether they are single color or capable of multiple colors. I went with the smallest LEDs, 3mm, in green. The modules can be connected together in serial and communicate using SPI. You can have a max of 4 modules, so I got 4.

While the Raspberry Pi supports easily outputting SPI, it still takes a bit of work. In order to get going quickly, I also got a Demo Driver board that lets you control the modules using USB.

Here is what I got:

4 – 8 x 32 LED Matrix, 3mm green ( DE-DP13111 )
1 – Demo Driver Board ( DE-DD22111 )

It took about 4 weeks for the hardware to arrive, but I went with the cheapest shipping option. I am happy with the 3mm LED size. I am just setting it up in a hallway and it is easily readable 10feet away. The larger sized LEDs might have actually been worse because it would have been tougher to read the text close up.

The driver board comes with a number of test functions. It takes in 12v, and provides 5v for the LED boards. I luckily had a Radio Shack variable voltage power supply lying around. I hooked up all of the boards to make sure everything works and I didn’t have any problems.

You can also use the driver board to display scrolling messages by connect it to your computer over USB. The program to do this is available for download here. The problem is that it says it is a .zip file when in fact it is a .rar file. I tried renaming and un-rar the file after I saw another similar file on their site… and it worked. To make your life easier, I have correctly zipped it up and uploaded it.

Sure_LED_1.0.zip

Even though it is a Java program, it only seems to work on Windows computers. In order to get a better sense of what it was doing, I ran the .jar file that is include through a decompiler. Here it is:

NewLcd.src.zip

With the knowledge I gained from that I wrote my one version of the program in Linux. It should work on the Mac, but I think you need to have a serial driver loaded. I will put together a follow-up post on how to write programs to communicate with the Driver Board.

Raspberry Pi

I recently got a Raspberry Pi. It is awesome. I am going to use this post to keep track of everything I have done to get it setup.

Config program:

  • Expand filesystem to size of SD card
  • Set locale to EN(us) UTF8
  • Enable SSH

Add proxy to apt-get:

  • sudo su
  • echo 'Acquire::http::Proxy "http://yourproxyaddress:proxyport";' > /etc/apt/apt.conf.d/10proxy

Update & upgrade:

  • apt-get update
  • apt-get upgrade

Emacs:

  • apt-get install emac

Enable system proxy

  • emacs /etc/environment
  • export http_proxy=”http://username:password@host:port/”

I was having trouble SSHing from my Mac and kept getting this error: “Host key verification failed.”

Doing this helped: ssh pi@<ip-address> -o StrictHostKeyChecking=no

WP_List_Table and an Extra Nonce

I am working on a WordPress plugin. For part of it I am adding a Metabox onto the Post Edit screen in the admin section. However things stop working if I add a WP_List_Table. That is because by default the list table adds a _wpnonce field, even though there is already one there for the Edit page.

This of course messes things up and prevents you from saving or updating. Not awesome. The field is output in the display_tablenav() function in the base list_table class. It looks like there has been a fix submitted, lets hope it gets into an upcoming version.

Until then, you can simply override the display_tablenav() function with a blank function or one that provides similar functionality.

Tilestream: Fixing interaction

When I upgrade to a new version of Tilestream / Wax, apparently the method for adding interactivity change. Before I think it pulled some of the info from a JSON file. It can still do this, but my files seemed to include localhost versions of the server. Anyhow, long story short, you need to make sure you specify a template in your TileJSON. To find this, request the TileJSON Tilestream serves up for your made:

http://server/v2/layer_name.json

Now look for the template variable and add it into the TileJSON you define in your javascript file. Mine is:

template: ‘{{#__location__}}{{/__location__}}{{#__teaser__}}{{{name}}} </br>\n{{{address}}}{{/__teaser__}}{{#__full__}}{{{permit_id}}}{{/__full__}}’,

Tilestream: Tiles not found

I just upgraded to a newer version of Tilestream. Unfortunately after doing that, all my maps stopped working. When I went to my Tilestream UI, I was able to see that it was up and it was finding the MBTILE files. When I clicked on info, it became clear that the URL had changed. Instead of having it be server/1.0.0/map it was now server/v2/map.

However after fixing my URLs, it still wasn’t working. Turns out I also needed to switch the mapping scheme from TMS to XYZ in the tilejson. Definitely not a seamless upgrade and I didn’t really see this change documented anywhere. I am still trying to figure out what I need to change to make interactivity work.

http://support.mapbox.com/discussions/tilestream/59-tiles-not-displaying-on-map

In your tilejson object, try changing the scheme to xyz instead of tms and let me know if that fixes the problem.

Installing NodePie on Ubuntu

I was transferring my latest creation over to my hosted Ubuntu server and came across the most annoying error. I had to reinstall the NodePie module because it relies on compiled C code. I kept getting an error though about something called lib-expat.
Anyhow, turns out you need to apt-get a new library:
sudo apt-get install libexpat1-dev

GitHub to the rescue:https://github.com/astro/node-xmpp/issues/33