Jimmy Engström



ZX Spectrum emulator running on Gadgeteer

2011-10-17 00:29:00 +0000

First off I would like to start with saying that the title on this blog post might be just a little exaggerated.

The Gadgeteer is running C# code that emulates the ZX Spectrum and so far it’s true.

Basically the emulator works by running cycles, showing the screen and repeating.

To get the correct timing this should be done 50 times per second, which means that we have 20ms to complete one cycle and show the screen.

The Gadgeteer is far from fast enough to achieve that, right now it takes 10 seconds to complete a cycle.

But this wasn’t the point, I suspected it wouldn’t be fast enough. The point was that is was possible \o/.
Within hours I managed to connect a screen to the Gadgeteer and make the necessary changes in the code to make it run.

For example I had to change List<> to an array, the .NET Micro framework doesn’t support List<>, and I rewrote the screen rendering to make it faster.


I find it fantastic that I can use my C# knowledge to create new hardware prototypes among all the other things like: xbox games, Windows Phone applications and games, Windows applications and games, and even write Iphone and Android applications.

There is no end to the possibilities =)



gadgeteer, first impressions

2011-10-17 00:00:00 +0000

Got my Gadgeteer compatible FEZ Spider kit a couple of days ago.

For those not familiar with Gadgeteer, it is an open source toolkit for building small electronic devices using .NET Micros Framework.
Microsoft is behind this project and GHI is the first manufacturer to release compatible hardware.

I have used Netduino before, the “problem” with Netduino is that it is extremely basic, you really need to know electronics.

Since I read a lot of these things in school I thought it would be a piece of cake getting stared with Netduino but reality soon came knocking.

Apparently nearly everything I learned in school about these things are gone, quite easy to read up on but still an obstacle between me and my new hardware toy Ler med tungan ute.

Gadgeteer is a fast prototyping kit that uses standard 10 pin sockets that are impossible to turn the wrong way.
It makes it really simple and removes obstacles between you and your finished prototype.
What I like about the Gadgeteer is that it has very little integrated functions, if you want Ethernet for example you need to connect the Ethernet module, there is not Ethernet built-in on the motherboard.

It has 14 connectors and every connector has a letter beside it.
The letter indicates what kind of module you can connect to that socket.



Its really simple to get started, GHI has an install-package that include everything you need to make your first application, or perhaps gadget is a more accurate description.


Start Coding

Now you are ready to start your first Gadgeteer project.

In Visual Studio you will find a new template section called Gadgeteer, to start making an app simply select “.NET Gadgeteer Application”.

What I saw next really made me happy, in Visual Studio you’ll get a designer window.

You only need to drag in the modules you wish to use and connect them to a compatible socket.

The designer even tells you which sockets that are ok.

But it doesn’t stop there!
Instead of connecting them manually you can right click and select “connect all modules” and the designer does the job for you.

These kind of help functions really makes me happy, I want to concentrate on coding not other things.


Some initial problems
I started of by adding a Multi color LED and wrote

And the LED did just that, it turned Green.. Say what now!?
Apparently there is a bug, in the LED’s firmware, but GHI is working on the problem.

Next I tried to make a camera app, press a button, take a picture and show it on the screen.

However the buttons didn’t trigger the pressed event this is also an known issue.

So the first two things I tried fail which actually made me a bit concerned.

GHI seems to be on top of things and is really active on their forums so I hope they will come up with a great solution.

Despite the initial problems I would say, buy this kit =)
There is a special feeling when you code runs on a device (like a phone for example).
There's an even more special feeling when your code runs on a device you just put together =)