Rik's Ramblings

Tuesday, January 24, 2012

Zippered face

Nice!

Friday, January 20, 2012

Pointless consumer product fuels pointless consumerism

I always thought tablets were pointless. Never saw the appeal of these underpowered, overpriced, input-mechanism-challenged laptop alternatives. Give me something with a keyboard would ya!

But now this!

Modern tablets have only been on the market for less than two years, but they have quickly become potent shopping tools that generate an outsized effect on online commerce.


This really makes me hate them even more! But it actually confirms my belief. Think about it ...

You're sat on the couch with your $500 toy, you should be happy right? Well, apparently you're not, but why? Well, you're unsatisfied and depressed, but why? You're unsatisfied and depressed because you are holding a pointless toy in your hands, which you wasted $500 on and doesn't really allow you to do anything fulfilling. And what do modern Americans do when they're depressed? go shopping!


So to summaries:
tablets and shit and make you depressed.

Thursday, January 12, 2012

Bre Pettis (aka Make/Makerbot) on TWiT: Don't get much geek-orgasmtastic than that!

Triangulation 36 | TWiT.TV

Bre talking about the newer, bigger, more colorer maker bot. Talking to my old buddy Leo on TWiT.



Make and TWiT in the same video stream - it don't get much geekier than that eh!

Wednesday, January 11, 2012

Dinner Night, Chevy's, Jan 18

Take the family out to dinner next Wednesday and support the Dartmouth Middle School Band program. Invite some friends and neighbors too!

Download this flier and hand it into your waitstaff when you pay for your meal.

Click to Download

When
Next Wednesday
January 18, 2012
5:00 PM – 9:00 PM

Where
Chevy’s Almaden Plaza
5305 Almaden Expwy,
San Jose,
95118


See you there!

Wednesday, January 04, 2012

Troubles with typedef on the Arduino

Why doesn't this work on the Arduino!?

typedef struct {
   int a;
   int b;
} TTallywag;


void DillyDally(TTallywag *tw){
// stuff...
}

In short, I don't actually know! But I know how to get around it!

To make it work, you have to change how you use your new data type - infact, your function parameters can't use types that you've typedef'ed, but you can use the type if you do so thusly:

typedef struct _tallywag {
   int a;
   int b;
} TTallywag;


void DillyDally(struct _tallywag *tw){
   // stuff...
}


According to the following page that I found, you should be able to use the TTallywag if you define it in a header file and including that into you sketch.


Note to self: Google 'Using headers in Arduino sketches'

I suppose technically defining types in header files is the right thing to do, but when you're dealing with a sketch that's only short, it seems such an overkill.

Now, the following does works fine. You can use the types inside functions no problemo. Which is partly why I spent so much time tearing out my hair last night!

typedef struct _tallywag{
   int a;
   int b;
} TTallywag;


void *ShillyShally(int alpha, int beta){
   static TTallywag tw;

   // stuff...


   tw.a = alpha;
   tw.b = beta;

   return &tw;
}

Must be some namespacing, or name mangling going on.

So it's not a huge problem, but if you're planning to share code modules between two devices, say one half in Linux written using GCC and the other half Arduino: Define your functions the latter way! That will work on both sides.

Tuesday, January 03, 2012

Video Game Shield

Amazing stuff! We've been playing with a video game shield over the Christmas break.

At first, I assumed the board contained some kind of TV controller chip to generate the analog TV signal. The reality the whole TV signal is created with two Arduino output pins, a couple of resistors and some rather fancy interrupt service routines!

I'm very impressed!

Most of electronics on the shield is actually only needed to interface with the Wii Nunchucks.

Schematic:

Click for full-size

Original at http://www.wayneandlayne.com/