Tip: Objects & Classes in Ember JS

Today I learned that, when using Ember JS, all of your ember objects come out as classes and not Objects. I literally spent ten minutes trying to figure out why my objects weren’t being properly instantiated.

I also learned that I can turn off my Mac Air by mapping sleep to the 11 finger touch. The most effective way of doing this is to place all fingers on the touchpad and then place your nose between them – a fitting bow and gesture at the end of a long day coding.

Making ls work as dir in windows

I frequently swap between development in windows and linux environments depending on what I need to do.

Without fail, EVERY time I get back to Windows, I end up typing “ls” at the command prompt and staring blankly at

'ls' is not recognized as an
internal or external command,
operable program or batch file.

for a few seconds before giving a small sigh and a weary facepalm.

This has happened SEVERAL times today, and while there is no great time loss here, I have a decided to fix this once and for all.

  1. Open notepad and type “dir” (without the quotes)
  2. Save the file as ls.bat (make sure windows doesn’t do some silly thing where it saves .txt on the end because you have view known extensions turned off)
  3. place this file in C:\Windows\System32 or wherever your System32 directory is.
  4. Rejoice.
Yup, it’s silly, but by golly, it’s fixed.
Oh dear...

Dusty Bootie 2011

Oh Burning Man, I miss you, but – like every year – come Monday morning, it was really time to go home. Eyes destroyed, skin mostly powder, 9lbs heavier, and spirit topped up to 100%.

The Flying V! Best use of shade structures to date!

The Flying V! Best use of shade structures to date! Home sweet home at 4:10 and Journey.

I’ll post pictures and stories later, but for right now I’m just going to put a little link up here for some folks on Reddit and those who didn’t make it out to Black Rock City this year. One of my favorite things to do at Burning Man is to go see Bootie drop some amazing mashup goodness on a crowd of incredibly happy burners. They give out CDs during the show, and as they don’t sell any of their music and give it away freely on the interwebs I don’t think there should be a problem posting the files here.

Without further adieu, I give you the contents of the CD Bootie gave out in BRC. Enjoy!

Click here to download Bootie BRC 2011 [320kbps - 165MB]

 

The Temple at Burning Man 2011

The Temple at Burning Man 2011 - Image (c) Reuters 2011

Note 1: I have no idea what Bootie CD this is or if it was especially made for Burning Man. I do know that they played almost every track off of it during one of their sets on the Playa.
Note 2: If this link becomes popular I’m going to have to take it down before my little server explodes. Maybe it’ll become a torrent at that point.
Note 3: Bootie, if you’re reading this and you want me to take this file down, please just drop me a note. I really love what you guys do and don’t want to degrade your control, image, distribution, etc in any way. I’m just trying to share what I believe to be free music with more people who also love you guys/gals.

 

Burning Man revelers

Burning Man revelers - Image (c) Reuters 2011

ShiftBrite with an Arduino and a touchscreen

When life gives you moderately non-linear 4-wire resistive touchscreens you make lemonade. Then you spike that lemonade with something tasty and toxic, and go make cool projects.

Recently a fairly sizable number of resistive touchscreens fell off the back of the e-waste truck and into my lap so it’s time to hit the shop and make something fun. My good friend Jill of blinky light love has recently started doing all manner of awesome things with RGB lights and, well… it looked like a lot of fun. Around the same time, Donut was putting in an order for some ShiftBrites so I jumped on that reduced-shipping bandwagon and got 10 of these things. They’re exactly what you would want if you have an arduino (or other microcontroller) and like pretty things that are fairly robust, well designed, and pretty easy to control.

Shiftbrite v2 closeup

Shiftbrite v2

First up was seeing if the touch sensors were even operational – I meant it when I said they fell off the back of the e-waste truck. If you’re wondering how to hook these up or how they work, you should check out the excellent writeup over at Sparkfun or the PDF put together by HanTouchUSA. In general, you power one line, ground one line, and read the resulting voltage out of a third to get the output from one axis. Swap everything around you get the other axis. Busted out a scope, a power supply, and made a little breakout board for the flex cables after a brief evaluation of my soldering skills and the flex terminals (conclusion: I don’t want to solder every one of these things if there’s a possibility that I’m going to have to search dozens to find one that works)

Setting up the touch screen

Touchscreen attached to an oscilloscope

Some quick experimenting later I had the lines out of the touch sensor identified and hooked up to an oscilloscope. Brilliant!   Wiggling a finger over one axis and then three taps.   Sensor away! Not 100% linear, and a bit wibbly wobbly around the edges, but I’m not doing surgery so I think it’ll be just fine.

Testing a touch screen with an oscilloscope
Testing a touchscreen with an oscilloscope

Arduino time! I found a simple and extremely useful library written by Jonathan Oxer that flips around the inputs/outputs as necessary and allowed me to read from my little four-wire touchscreen. After a bit of code modification to dump out some more information to the serial terminal I had my controller!

Next up: blinkies. External power seems to be the way to go with these things, so out came an old 6V wall wart to save the day. Remember to hook your grounds together! A quick Jack-‘n-Hack, this time with Digger 450’s code, to get the ShiftBrite control on lock. Originally my plan had been to make the touchscreen some part of an HSV color picker. We only have two axes, so without more hardware we’re only getting HS or HV. My first implementation was for HS but, as it turns out, HV is much more useful and allows you to play with the intensity and not blind yourself during development. More Jack-and-Hack on Stewart Russell’s code got me a suitable HSV to RGB transformation method. Sure, it only goes to 255 on each channel and the ShiftBrites can do better, but I’m ok downgrading to 16 million colors from a billion+.

So how did it turn out? Here’s the video proof. Would like for the code to differentiate between dragging finger and tapping states but that isn’t critical and… well, we’ll see if I end up needing it.   The code is up on gitHub should you want to make your own blinkie light selection.

If you’re really interested in the touchscreens hit me up on twitter and we’ll work something out. There’s no way I’m going to use all of these.

DIYLILCNC – Now in 3d!

Sooo it’s been a while since this blog has seen any action and I’ve latched on to the idea that betaorbust will be heading back to its original design and pick up as a blog for the various side projects I’m continuously working on.

With that said:

Recently I’ve started looking at CNC machines with Kyle Marsh and Chris Gilmer (for a project that I’ll detail in a future post) and we found DIYLILCNC. Unfortunately they’re still in the “working the bugs out” phase and one major thing they were lacking was a 3D model (honestly, crazy engineering respect to the guys who did this using only illustrator and some WICKED spatial reasoning.)

But really… it’s 2010 and anything this complex should have a digital representation to facilitate redesign etc. To that end I threw down maybe 40ish hours of nights/weekend/lunch/dull meetings/etc to bring you this:

It’s a full build (minus the Dremel they use for a power plant) right down to accurately modeled machine screws and bolts.

DIYLILCNC - JF Mark 10

Full CAD of the DIYLILCNC (JF Mark 10)

Improvements over the existing design/drawings include:

  • Made walls square. Now with 90 degree power! (Note: this wasn’t a HUGE issue just a degree here and there)
  • All hardware (bearings, bolts, washers, rods, etc) modeled off of McMaster drawings where available. Measured parts I had in the lab when I couldn’t find McMaster drawings.
  • Fixed a flaw where the Y Drive Belt dragged against a misaligned hole when the gantry wasn’t working near the center of its range.
  • With a fully-assembled model any gaps in the documentation can be referenced against the CAD

At some point I’d like to build one of these but I think I’ll hold off until Version 2.

The plans and model are controlled under the virus-like CC Attribution-Share Alike 2.5 Generic license and have been submitted back to the project as of this morning.

For those interested the package can be downloaded here (again, in the grips of CC A-SA so make sure you post that if you use em)