Building NodeJS on OS X 10.5.8

It seems that I borked xcode, did something bad with my libssl, or just that my system’s too out of date to trivially install, homebrew or build NodeJS. I really want to install Node, so here’s what I just did.

I started off downloading and extracting the latest NodeJS source tarball (0.4.2 at time of writing). After attempting to configure and build, I was getting some complaints out of make:

I was getting some complaints out of make:

../src/node_crypto.cc: In function ‘void node::crypto::InitCrypto(v8::Handle)’:
../src/node_crypto.cc:2917: error: ‘SSL_COMP_get_compression_methods’ was not declared in this scope
Waf: Leaving directory `/Users/Ian/node-latest-install/build'
Build failed:  -> task failed (err #1):
	{task: cxx node_crypto.cc -> node_crypto_4.o}

After a helpful tweek from @tonymilne I looked at the output of ./configure slightly more closely: whilst it reported it found header openssl/crypto.h, it said that openssl was not found.

Getting an updated version of OpenSSL was pretty easy with homebrew:

brew create http://www.openssl.org/source/openssl-0.9.8r.tar.gz
brew install openssl

It didn’t quite fully install though. It told me “This formula is keg-only, so it was not symlinked into /usr/local”, and that

If you build your own software and it requires this formula, you'll need
to add its lib & include paths to your build variables:

  LDFLAGS: -L/usr/local/Cellar/openssl/0.9.8r/lib
  CPPFLAGS: -I/usr/local/Cellar/openssl/0.9.8r/include

Turns out that similar but different problems were solved by setting options with configure, and running ./configure --help in the folder with the NodeJS source shows some pertinent options. I tried

./configure --prefix=~/local --openssl-includes=/usr/local/Cellar/openssl/0.9.8r/include  --openssl-libpath=/usr/local/Cellar/openssl/0.9.8r/lib

and it seems like it was successful – node --vars includes -DHAVESSL=1.


The Compleat ATtiny13 LED Flasher: Part 3 – Low Power Mode

This is the final part of three in attempting to explain how to make the ATtiny13 flash a LED.

In previous posts we’ve looked at creating a simple LED flasher circuit for the ATtiny, a first-pass program for the ATtiny using delays, and a second-pass implementation exploiting timer overflows resulting in a simpler program.  In this article I will explore the power saving modes on the ATtiny13 as an example of how to minimize the power consumption of your circuit.  If your ATTtiny13-, ATtiny80-, or even ATmega-based circuit relies on battery power you will be able to significantly improve the battery life by using the chips’ power saving modes.

In this article we will be using the same circuit developed in the previous posts:

Read more »


The Compleat ATtiny13 LED Flasher: Part 2 – Using Timer Interrupts

This is the second part of three in attempting to explain how to make the ATtiny13 flash a LED.

Post-Pre-script: If you find this post useful, happen to try out the code, or have any other views or criticisms, please leave a comment. I’d love to hear what you think.
- Ian

So last time around, we made a LED flash.  Of course there are other, more elegant ways to do it.  In this post I’ll explore interrupts, and specifically the timer overflow interrupt.  For this I’ll use the same circuit setup from the first article.  If you’re reading this one independently, here’s a circuit diagram:

Read more »


The Compleat ATtiny13 LED Flasher: Part 1 – Setup, Hardware and A Basic Solution

This is the first part of three in attempting to explain how to make the ATtiny13 flash a LED.

If you’re used to the user-friendliness of Arduino, getting started with bare bones AVRs can be hard work.  I’d like to try to go slowly through the early steps and point out some of the information sources I used.

First, start at the end: here’s the final circuit.  It has an ATtiny13, an LED and current-limiting resistor, a few wires, the programmer interface, and that’s about it.  All it does is flash the LED on and off (very much like the classic 555 timer astable multivibrator but with the advantage of no passive components required).  That’s it.  Not much to it.

Also, here’s a quick sketch of a circuit diagram too – the inputs all come directly from the ISP interface from the programmer.

Ok, that’s the end result.  Next: how to get there:

  1. Prerequisites (hardware and software)
  2. Build the circuit
  3. Write code
  4. Upload to microprocessor

Read more »


Arduino Game Of Life on 8×8 LED Matrix

I was messing around with some Christmas toys and threw together a Conway’s Game Of Life implementation together on my Arduino.  I just love how quick it is to get things up and running on this platform.  It took me longer to solder a platform for the LED matrix to raise it up off the breadboard so the wires would all fit than the whole rest of the project.

Here’s a video of Arduino Game Of Life running.

Anyway, more pictures and full source code are below.  The code has a couple of conditionally compiled options, one for storing rand seeds to EEPROM.  With the randomization turned on, every so often I’d see a “game” that progressed really nicely.  I wanted to be able to go back and watch the same game again.

Read more »