Making a custom 3D printer controller

20 Aug

Making a custom 3D printer controller

While working on my new printer, I realised how ugly most reprap controllers are. All those I've seen use large SD cards & bulky oldskool LCD's with really poor contrast and viewing angles. Why not use Micro SD & an OLED screen?

You can actually build your own custom controller using any combination of screen, SD reader and encoder, but I couldn't find a good description of how to do it, so here it is. Setting it up with the Marlin firmware can however be a daunting task, so this article aims to document how I went about doing it.


Why I’ll never use Windows Phone again

04 Aug

Why I’ll never use Windows Phone again

It's been a while since I posted a good rant. Here's one that's been brewing for some time. I refuse to belive that ANY Microsoft employes that ever had an iPhone or Android, actually tried to use Windows Phone for a full year. I have and I can tell you - it's utter bullshit. I don't doubt that a lot of talented people have worked hard to make it happen, but without someone capable of telling what is good and bad, you cannot succeed. The whole OS reeks of a lack of interest and use.

I gave it a full year as I figured they'd get som time to fix the major bugs. Despite three fixes delivered over the air, they have not solved anything that could help me like the platform. They have however added a menu with "Extra settings" that I'll never use.

Here's my 6 biggest annoyances:

The Search Button

This is my single biggest gripe with Windows Phone and the person that made this choice should be fired immediately. He/she has done irreversible damage to the company in insisting on this bug/feature. When I'm pressing the search button - it is ALWAYS in a context! I have ZERO interest in opening Bing (see below) when I'm clicking the search button - EVER! If I'm in Spotify - I want to search Spotify for a song. If I'm in my contacts list - I want to search for my contacts. If I'm in a browser, I want my PREFERRED search engine. This would be so easy to understand if you ever used this phone.

When more than 50% of all apps (including Microsoft's own) needs to implement it's own search button in software AND you have a physical one that does not do anything sensible - it would be obvious to most developers to combine these. In many apps there's actually a menu bar at the bottom of the screen just to show a search button. It must be some incredibly stubborn person inside the company that insists on this. That person cannot be using Windows Phone at all. After using it for a year, I now have a long list of (mostly shitty) applications. To change a setting I have to scroll quite far. Imagine how neat it would have been to search this list of apps instead of going to Bing.


Settings menu is presented as text, but non alphabetical. Why on earth is Flight Mode and (screen) Brightness not on first page, when Theme & Internet Sharing is at the top? How often will anyone Microsoft developers actually change their theme? And how many "average" users will ever use the internet sharing? And why use text rather than icons for a non-alphabetical list? I refuse to believe that a single hour of user testing went into this.

Internet sharing

This feature turns off at it's own will. If I turn it on - I really want it to be on ALL the time UNTIL I turn it off myself. I have no interest in power saving for this feature. I just want it to work an not turn off every time I take a minute to answer an email. It does not work the way it's implemented now. It's simply too annoying to use.

Common volume

There is one common volume setting on the whole phone. This controls both media playback, ringtones, speaker volume and haptic feedback. Turn it off and you'll walk for half a day enjoying silence. Then you'll panic and realize you've lost tons of phone calls, Skype calls, messages and other notifications. Smart smartphones knows that AT LEAST the ringtone must be a separate volume or people will screw up and if this is due to the smart-phone not being smart enough, they'll get a better phone.

Lack of apps

It's ok not to have thousands of apps just when you're launching something. It's ok that not all the major app vendors support you right away. You MUST however do some filtering and make some CORE apps. Not having a youtube app is unforgivable. I know Youtube is a Google property, but that's irrelevant. Without a proper Youtube-app, you only got half a smartphone. It's that important. Allowing more than 30 wrappers around the web version of youtube is not adding value. It is destroying value. If I have to download 10 bad apps just to get one that is good, I'll stop downloading apps. It's that simple. Throw out the shit, retain and promote quality.

It's ok to not make just as good apps as Google, but you need to have the basics working. The Maps-application that come with Windows Phone, fails to locate pretty much anything other than cities. If that's a feature, you should probably name it "City-search", but you should not call it "maps" if it cannot find features on a map. I've viewed maps in the app and stared on the name (written on the map) and despite this, the search feature is unable to find that very location. I dunno why, but there apparently no relation between the map and the search. This makes the app somewhat useless.

If you want to get thousands of QUALITY apps in your store, you need to make sure that the vendors of cross platform authoring systems add your export. Adding Windows Phone export in Adobe AIR could give you millions of new installs. All they'd need to do is to recompile and export. Unity already exports to Windows Phone and I'm sure quite a bit of the current apps come from that. Nobody will learn a new platform/OS unless it's from Apple/Google and you know you have a huge market waiting. If you're entering this market to compete with them, you'll need to make it super-easy to make apps. You cannot force everyone to get a PC and learn Visual Studio.


My WinPhone is a Samsung Ativ S. The specs are pretty neat. It should be lightning fast. When I type a URL in the browser, suggestions will pop up as I type. This is nice, but not when the first suggestion pops up 3 whole seconds after I started typing. As I try to tap any of these suggestions, the list will re-order, so and I'll open some random URL. Come on. This is just looking up and displaying a list. It's a very basic programming task. How can this possibly take three seconds on this hardware and why on earth didn't anybody notice this and fix it after a whole year?

Bonus grudge: Bing as a search engine

I refuse to believe that it isn't possible to make something better than Bing. If I'm at a silent party I will sometimes pull up my phone and have people suggest random things that we should search for using Bing. We'll then laugh together at the results. Yeah - the results are so bad that it's fun. They are for some reason much worse if searching from a phone than from the desktop. If I worked at Microsoft search department I'd be crying.

One example: at Bitraf I hosted a workshop about "Myke kretser" (Soft Circuits written in Norwegian). Just before the event I used Bing to see if they had indexed the page. This was a month after I put it up on The search for "Myke Kretser" returned 1970's NBA player "Mike Kretzer" first and then even more irrelevant results. Come on. Not even one of the two words are alike or has even remotely the same meaning? Google had it right two days after I posted the event on Meetup. Bing now returns the correct phrase, but links to my slides from the workshop (derivate) rather then the Meetup page (source).

Bye, bye

If I spent more time, I could probably come up with more than 30 solid software and usability bugs in Windows Phone. The whole OS is incredibly unpolished. In addition, my Samsung Ativ S phone has been randomly rebooting at least once a day. I originally attributed this to a software bug, but none of the updates from Microsoft/Samsung ever solved it. To be honest, I now doubt it's a hardware bug. Good riddance Windows Phone. It's been an annoying year with you. I won't go back...


07 Jul


I really love those squeezed-in weeks of work in between family holidays. It's a rare time to catch up on thing like blogging, reading & updating a few personal projects. I just finished reading The Martian by Andy Weir that I got recommended from @hpeikemo. It's a really thrilling book that I'm sure we'll see as a hollywood movie soon. The story is kind of a "Robinson Crusoe meets McGyver on Mars". After reading it, I gave it to my son who completed it in just two and a half day. Great summer read!

I finally got around to update my Arduino Companion app. It's ratings have suffered quite a bit since Android 4.4 is now pretty common and it took Adobe a LOT of time to fix the bugs. When the fix finally was available, I was stuck with client work and didn't manage to set aside the two days required to fix it. I can only apologise that it took this long.

It sucks to loose the 4.6+ rating on Android, especially since it's mainly due to ppl like Nicholas Castle that wrote the 1-star review to the right. I don't mind a 1-star review that says that the app does not work (when it does not), but this is kind of harsh from someone that hasn't even seen the app? It's not like he paid anything (it's a free app) or that I have a 100 person customer service department. I make the app on my spare time, I give it away and my email is listed below the app. Oh well. I guess I'll rather thank users such as John, Daniël, Luiz, Thomas, Tim, Bryce, Samantha and many others for nice and polite feedback with reminders to fix the problems. As soon as Apple approves the app, the more than 105.000 iOS users of the app can download the update to version 1.2. The more than 102.000 Android users can get it today. More than 200K happy users... Crazy isn't it? grin

The months since December is sort of a blur as I've done more client work than I usually do. The most fun commercial projects this autumn was building a series of custom wifi-enabled LED signs as well as working with UNO. After summer I'm really looking forward to teaching another half-year of Embedded Systems at NITH here in Oslo. There is something really special about seeing computer science students actually understanding the core operations that enable the computers they use every day. It's all just one's and zero's, but you don't really get it until you have to create the bits yourself by turning power on/off at the right intervals... The students were really happy with the course last year and I have plans to make it even more fun this year!

Since I've worked long days, I haven't had that much time for my hobbies but I've gotten quite far on building a X/Y robot that I have plans to complete before going to the Maker Faire in Trondheim in August. It'll be able to draw, print and probably also do some light CNC'ing when I'm finished.

Just before the summer holidays I managed to squeeze in two weeks to build a brand new 3D printer from scratch using Makeblock! This new printer will have a bigger build envelope, but it will also be able to use flexible plastics, nylon, wood and bronze materials thanks to it's construction. Read more about all the advantages here. With that you would think that this fills my appetite for 3D printers, right? Not quite. I spent my tax return on signing up for the Titan 1 SLA printer as well. It'll give me extremely high resolution models as well as solve my problem of printing parts over night without disturbing the family. That said - the Makeblock-based printer is much more silent than my Ultimaker. Looking forward to November & meeting the Titan!

What platform next?

20 Feb

What platform next?

In 2013, Adobe completely dropped the ball on the Flash Player and AIR. All further development has been moved to India. This normally means that the software has been put in what is referred to as "Maintenance mode". Any serious bugs will be fixed, but don't expect much in terms of new features. If you take a look at the Release Notes for AIR 4.0, you'll see what I mean.

AIR will exist for many years still, but it's time to look forward and figure out what's next. What I'm looking for is a platform that will let me create both mobile and standalone apps easily, like Adobe AIR was but with a company that is still committed to the technology. Perferably with a solution that can create smaller and faster apps than AIR.

Some alternatives

For many years I wanted to look into Haxe, but I never got really into it. It was just to "techy" to get going. I really want a one-click installer that gives me all I need to get started. Some of my coder friends spent lots of time with Haxe and said really nice things about it. Other friends have looked towards Java. Joa Ebert has a nice thing going with Defrac and the demo video he published recently looks awesome. I don't want to move in the direction of Java though.

I've also looked at Corona. I really like the idea of using Lua as the main language but Corona only outputs for devices. I've played around with Unity a bit and that I really liked. It's very geared towards games though, so while it's fun, it's also not exactly what I'm looking for.

Ever since I started programming as a kid, I've shyed away from C & C++. Memory handling and pointers always seemed like unnecessary complications, but after playing around with microcontrollers with 2Kb ram and less, I've changed my opinion about that. The last two years I've done lot's of it and I'm really enjoying it. Seems like a good direction to go? Everybody said nice things about C# and Microsoft Visual Studio, but Microsoft don't have much of a story in terms of cross platform app publishing.

This autumn I've done a series of lectures at NITH on the topic "Embedded Systems". Great fun! One day during a break, I got a call from a former NITH student and acquaintance asking if I had any plans after my teaching duties. 

Outracks & Uno

Some days later I were in the offices of a company named Outracks. This is a relatively small company with a massive goal. They're building a complete coding ecosystem from scratch, right here in my hometown of Oslo. With this I mean that they are creating a language called Uno that has compilers so that it can output to iOS, Android, desktop and more. That just sounds like an AIR clone, right? Not quite. Uno is the first programming language to unify GPU and CPU pogramming. You write the app and all the shaders in the same language. The end result will run on both GPU and CPU and in many cases you don't even need to think about that part of it. The export is always a native app (no runtime bloat), but Uno also exports to HTML5/JS with 3D done as WebGL. In other words - you can make GPU accelerated apps for pretty much any platform with Uno.

They're also creating an authoring tool called Realtime Studio that is a complete coding environment with integrated preview, a solid code editor, inspectors, node view for code (loving this one!), drag and drop support, gui for various export targets and more. On top of that they're creating a UI FrameWork and exactly this was what they wanted me to help with.

The plan was that I were to develop a desktop app for a (still secret) client using their complete toolkit. Over a 1.5 month period I worked on the app and provided tons of feedback and I have to say this is shaping up to be one hell of a toolkit! The UI framework is completely GPU based and this does wonders when it comes to speed. Imagine having a slightly scaled down version of the Flex framework running completely on the GPU?

Why it's so cool

Uno is closely related to the C# language. If you already have C# experience, you'll be able to jump right into x-platform development. I however had basically no C# experience when I started the project and that was one of the things they wanted to test. How quickly would I pick up the language? What would I miss from other platforms? What would be the big hurdles?

Despite all the tools being under constant development, I would say that it took only 2 weeks to learn the language. After that I was fairly productive and knew where I was going. The next 2 weeks went by trying to understand and use correctly all the new goodness available to me that I never had in Actionscript. Uno has support for overloading, abstract classes, swizzling, lambda expressions, extension methods and much more. The last two weeks were really productive and we did reach a finished product. That said, it is still being actively developed and polished and I can't wait till I get to tell more about it.

The one thing that I still haven't wrapped my head fully around is writing shaders. While Uno makes this much easier, it is still something that I'll need to learn more about. Something also tells me that this is something that'll take quite some time as it's a quite different mindset. GPU's work in paralell and all operations happen on all pixels at the same time. That takes some getting used to from thinking more or less serially. What I can say is that I'm pretty sure that I've found what I'm looking for. This is actually the only platform that I feel comfortable spending my time on. Worst thing that could happen is that I've learned C#.

Uno will launch with lot's of official API's that are supported on all platforms. In addition there will be several APIs that are available for some platforms that you can download support for. Outracks has made a backend that is extendable, so if there is a feature you need in a specific platform, you can just add it yourself. It's like Native Extensions on stereoids. Want MIDI on the desktop? Find a premade library in the form of a DLL, write some interfacing methods and you're ready to go. This is going to be incredibly useful for those special hardware integration projects that I sometimes do for museums and exhibits.

Bottom line

I could transition in just a few weeks to a completely new platform. That's pretty cool in itself. Not only can I target iOS, Android, browsers & desktop, but Outracks are playing around with support for lots of other devices and platforms. In the office there were FireFox phones, Nvidia-boxes and lots of other interesting hardware. The apps I've made play with blazing speed and I've seen things that I've never before seen running on a mobile GPU. I can't say how much better that feels than seeing things like this go unnoticed. Having spent a lot of time in the Adobe Forums lately, I've seen many hundred important questions go completely unnoticed by Adobe. I need a platform with people that care and I feel that Uno is by far the strongest contender.

A public beta will be launched at FITC this coming week, so be sure to sign up for that. If you're actually at the event, make sure you catch one of the two sessions that Simo is presenting. He's been using Uno longer than anybody and he's made some seriously good looking things with it!


Apple is not currently accepting applications built with AIR 3.9

03 Feb

Apple is not currently accepting applications built with AIR 3.9

From the 1st of February, you'll get the following error message when trying to submit your Adobe AIR based app to Apple's App Store:

    Apple's web service operation was not successful
    Unable to authenticate the package: somenumber.itmsp
    ERROR ITMS-9000: "This bundle is invalid. Apple is not currently accepting applications built with this version of the SDK." at SoftwareAssets/SoftwareAsset (MZItmspSoftwareAssetPackage)

From February, you'll have to build your AIR apps using the iOS 7 SDK (comes with XCode 5). In other words - if you are using Flash Builder or the Open Source Flex SDK to make iOS apps, you'll need to upgrade a bit. Adobe added support for this in the 4.0 Beta version of the AIR SDK that is now available on Adobe Labs. I do not know how this affects Windows users, but for Mac users you just download Xcode 5.x and use this instead of XCode 4.x. Next you download the AIR 4.0 Beta SDK and install it. Instructions for how to install/upgrade your AIR SDK can be found here.

With the beta and XCode installed, all you have to do is to up the version number to 4.0 in your App XML and maybe update the path to the new iOS simulator for testing.

Note: this only applies to new submissions. All apps that are already approved are still good.


Error occurred while installing the application: Invalid specified

28 Dec

Whenever you get this error, you need to check exactly what devices are connected to the computer. I had the problem that every time one of my colleagues came to the office, Flash Builder would all of a sudden not debug the AIR apps that I built using Flash Builder. The problem affects all ADT-based tools so this might be useful also if you're using Adobe Flash Professional or other tools (like xcode, java) or more to author your Android or iOS apps.

The fix is simple. Open a terminal window and type the following:

/Applications/YourApplicationName/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/bin/adt -devices -platform ios

The path to ADT will vary based on your machine, but if you're using some kind of Flash SDK, it'll be in a subfolder like the above. This command will show a list of the devices currently seen by the ADT and in my case, the phone belonging to my coworker showed up. His device wasn't physically connected to my machine, but since ADT supports debugging via wifi, it can still be used by the tool. For some reason, Adobe's tools will ignore the request to debug via cable and instead tries to connect to the Wifi device.

Pressure sensitive floor

28 May

Pressure sensitive floor

I just came back from the most challenging physical computing project I've ever done. It's a 13 by 8 meter labyrinth where you walk in the dark and get a sensory experience based on more than 300 sensors. The main challenge was actually how much time it took to execute it, but it was such a fun project that I didn't really mind. You can now try it out yourself at Energisenteret in the theme park Hunderfossen (Troll-themed!) near Lillehammer, Norway. I don't know for sure, but I think this is the worlds first "pressure sensitive floor"?

I've worked on several projects with the company SixSides and about a year ago, they asked me if I could build a floor that reacted to the people walking on it. The basic idea was to play back sounds of walking on other surfaces than you really were. Of course I said yes to the challenge!

Read the rest in the hardware blog...


VerifyError: Error #1102: Illegal default value for type int

07 May

Stubled across an AS3 compiler bug that I've seen before, but couldn't find a good explanation via Google for. If you get the above error, make sure you don't initialize an "int" to "null". Changing it from:

public function Quad( w:Number, h:Number, color:int = null )


public function Quad( w:Number, h:Number, color:int = undefined )

will remove this stupid compiler error...

Unexplainable errors in Flash Builder 4.7

11 Feb

For reference: if you have unexplainable errors in Flash Builder 4.7 (and other versions) make sure you turn off "Marc Occurences" in the IDE. Turning this feature off holds the key to removing errors such as:

" java.lang.NullPointerException" and several more.

2012 - what a difference a year makes

06 Jan

2012 - what a difference a year makes

The last year was full of changes for me professionally. My focus is still games and entertainment, but I'm drifting towards other languages and platforms than I've been using the last few years. I've changed office and I'm also spending lots of time on my new hobbies: electronics and 3D Printing!