programming

You are currently browsing articles tagged programming.

Arduino Hacks: Using the built-in LED’s and button on the LadyAda ProtoShield

This week I finally received my Arduino Starter Pack from Adafruit. The Arduino is an awesome, Open Source, easy to use platform for getting started in embedded programming. It uses the ATMega168 AVR processor, and there are a bunch of great Open Source toolkits for programming and working with the platform. Very fun.

One of the great things about the AdaFruit starter pack is that it comes with the ProtoShield, an easy daughter-board for prototyping. The ProtoShield also comes with two extra LEDs and a spare button you can wire up to use in your projects. They’re great to use as built-in status LEDs or mode buttons.

But there is no documentation anywhere on how to use them. Poking around at the board and looking at the schematic, I eventually figured out that there were just a couple spare holes on the board that you can use to access them. But they don’t lead to any of the onboard headers, so they’re hard to use.

Fortunately I had a left over three-position header from the kit, so I wired it up with jumpers on the underside of the board.

The Ugly Underside

Its ugly, but it works. Now I can just run jumpers to my breadboard to take advantage of them.

Using the new header

Hopefully somebody else will find this useful.

Tags: , , , , ,

Thrift

Facebook, the social networking site, has released a critical piece of their infrastructure, code-named “Thrift” as Open Source:

Thrift is a software framework for scalable cross-language services development. It combines a powerful software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, and Ruby. Thrift was developed at Facebook, and we are now releasing it as open source

Those of you who aren’t software engineering nerds like me and haven’t spent the last year and a half elbow-deep inside one of the world’s largest service oriented architectures might not realize how huge that is.

Corner

When you set out to build a large distributed system, the first question you have to answer is how you’re going to glue it all together, especially if you don’t want to have to use the same language everywhere. You could use something standard like XML-RPC or SOAP, but XML is slow and sometimes inflexible. And you don’t really care about interoperability with third-party systems - you just want to be able to connect your pieces together. And what about server frameworks? Do you really want to have to implement all those annoying little bits like configuration and logging for every language you want to use?

What you really need is one standard framework for everything. Thrift provides this. Define your service APIs in a common language and the framework automatically creates bindings for every language you’d want to use, along with service code in your chosen language.

Very cool. If I manage to find some free time I’ll be sure to play with it some more.

Tags: , , ,