HTC Touch + GPS BlueTooth + tomtom6 for dummies

Si te preguntas como configurar tu HTC Touch con un receptor GPS BlueTooth para usar el navegador tomtom 6, sigue leyendo.
En este tutorial, voy a utilizar el siguiente receptor GPS:



Holux M-1200. 70 pavos aprox. en el MediaMarkt, aunque he visto gente en foros que lo ha pillado hasta por 40 en intesné.

Todavía no lo he probado en un viaje largo, pero por ahora parece que va de coña, y es muy pequeño. La semana que viene le dare chicha en Alemania, a ver cómo se porta...

En fín, al lío: Primer paso, enciende el Holux M-1200.

Segundo paso, abre el CommManager de tu HTC Touch y selecciona Configuración -> BlueTooth




Siguiente paso. Añadir un nuevo dispositivo BlueTooth y emparejarlo con tu HTC. En las fotos vais a ver que ya está añadido (lo siento, soy muy vago y me ha dado pereza quitarlo, aunque sean 20 segundos). Voy a hacer como si no, y voy a crearlo otra vez: Seleccionar la opción "Añadir nuevo dispositivo"


El HTC buscará dispositivos BlueTooth cerca y mostrará en una lista todos los que encuentre, entre ellos, el Holux.


Selecciona el Holux y pulsa en "Siguiente". Aparecerá la pantalla de configuración de la asociación, emparejamiento, o como te de la gana de llamarle. Como la siguiente:



En ella marca la opción "Puerto serie" y pulsa sobre "Finalizar".

Después, hay que cambiar un par de cositas en la configuración BlueTooth. Ve a la pestaña "Puertos" y pulsa sobre "Nuevo puerto saliente":


En la siguiente pantalla selecciona tu dispositivo (en este caso Holux M-1200) y pulsa en "Siguiente". Llegarás a una pantalla como esta:



En ella selecciona uno de los puertos COM de la lista y asegúrate de NO MARCAR la opción "Conexión segura".


Nota: Si no sabes qué puerto COM elegir, tienes dos opciones: probar uno a uno hasta que funciones, o usar un programita como el que trae el Holux M-1200: GPS MiniViewer, que tiene una opción para escanear todos los puertos diciéndote en cuales encuentra GPS y en cuales no.

Una vez seleccionado el puerto, pulsa en "Finalizar" y vuelve a la configuración BlueTooth, esta vez para ir a la pestaña "Seguridad":







Asegúrate de dejar la opción "Autenticación (llave maestra) requerida" DESMARCADA.

Pulsa en Ok, y ya está. El tomtom6 te debería reconocer el GPS.

Nota1: Ten en cuenta que a veces al tomtom le cuesta un rato reconocer el GPS

Nota2: Si el GPS que usas no es el del ejemplo, la configuración puede variar. Lo mejor es que mires bien en su manual, sobre todo las cosas relacionadas con seguridad, etc.

Nota3: Para usar el GPS bluetooth con el tomtom no es necesario que toques nada en la opción "External GPS" de la pantalla Inicio->Configuracion->System. Déjalo como está.









HTC Touch + HTC EndKey application

I recently installed the HTC EndKey application in my HTC Touch, and I must advise you not to do so, mainly due to:

1.- This app is not very useful for the Touch, as it only gives you quick shortcuts for funcs like: lock phone (the htc touch is lockable via a long press in the red button), vibration mode (easily accesible in the speaker config icon), airplane mode (it may be useful if you take a plane twice a day...)...

2.- It seems that there´s no single way in the hell to remove it, appart a hard reset. When you install it, the HTC Touch warns you about it, because its a WM5 app. That should be no problem, but when you try to uninstall it, an error occurs, and it´s not removed.

If anyone knows how to uninstall without doing a hard reset, please post it here...

Cheers !

Automatic Lightmap Generation for Generic Sets of Geometry in Real Time Simulation

Siguiendo en el baúl de los recuerdos. No encuentro link al pdf, pero éste es el título de un Short Paper que publiqué en el año 2002 junto a mis mentores Alex García Alonso y Luis Matey.

Fué la primera aproximación a la técnica desarrollada para atlas de coordenadas genéricos.

Seguiré buscando a ver si se puede bajar de algún sitio.

Hi !

Texturas precomputadas para aplicaciones en tiempo real

Hace ya algunos años, publiqué un artículo en colaboración con mis dos mentores (Dr. Luis Matey y Dr. Alex García Alonso), que llevaba el título:

APLICACIONES AVANZADAS DEL USO DE TEXTURAS
PRECOMPUTADAS EN ENTORNOS DE SIMULACIÓN EN TIEMPO
REAL
En la revista de ingeniería industrial de la Universidad de Bío Bío, en Chile.
En ese artículo se describía una propuesta diferente para generar lo que hoy se conoce como "Atlas de Coordenadas" de forma automática, para la aplicación de lightmaps y otras técnicas a mallas geométricas genéricas.
Os dejo aqui el link por si a alguien le apetece echarle un vistazo.
Saludos.

XBox360 Controller for Windows - PC

Last week, I bought an additional XBox360 controller. In this case, I bought the wired version, because I wanted to use it with my PC without the need for an additional wireless adapter.





I must say it works flawlessly on the PC. You just need a special driver found here.

You can use it with XNA as well, though now, with the XNA GameStudio 2.0, you can read many other controller types, not only the XBox gamepad.

Cheers!

XNA Image Reflector. Easily create web2.0-like reflected images

XNA is for games, but not just for games! ;)


I finally posted the XNAImageReflector article to TheCodeProject. It includes full source code, screenshots, instructions and programming details.


About XNAImageReflector:


It´s an application that integrates XNA rendering and maths with Windows Forms. and that lets you create images like this one in 5 seconds:







Hope you like it!

TheCodeProject article: XNA Billiards Visual Demo

Today, I have uploaded another article to TheCodeProject. You can find it here.


I paste here the introduction:

This article is an example of 3D rendering and content processing with XNA, and a good start for those you want to start learning XNA. Although it´s not a full working Billiards game (that will be another article), it can be a good starting point for one too.
It´s not intended to show the best way of doing anything, it´s just a quick example I´ve made in four or five ours. Any improvement is really welcome!
It covers the following topics:
  • Content processor development
  • Content exporting from 3DSMax, including Max shaders, ready to use with XNA
  • Content loading
  • 3D rendering, with and without Max Shaders
  • Basic camera development
  • Basic Sprite management
  • Basic custom user interface development
  • Mouse reading
  • Scene and 3d models management
  • Settings serialization with XML
  • Additional model properties implementation
Hope you like it.

Double Buffer Graphics in C# + GDI (II)

This happens sometimes to me.

As a C++ programmer, when I moved to .net I was not used to have things done there for me, so I tended to do everything on my own (I found myself once programming a method to search a substring inside a string... ;), and today it happened again.

Augusto Ruiz has left a comment in my last post about GDI DoubleBuffering that is worth to mention, because all the DoubleBuffer implementation I showed in the last post, can be overriden by a simple property of the control you are going to render in:

public class DoubleBufferedPanel : Panel
{
public DoubleBufferredPanel()
{
this.DoubleBuffered = true;
}
}

This property is inherited from Control, so any windows control has it, but is protected. Thats why you need to create a custom Panel, Button, or whatever you want to use as rendering target. Just change its value in the constructor and that´s it!

The previous implementation still has it´s advantages, like a full control on the rendering and presentation process, but for simple cases this way is muuuuuch simpler.

Can´t understand why a google on this topic shows CodeProject entries talking about a custom implementation like the previous one, and no one talks about this way. Probably because it´s too simple and everybody knows it... je je...

Great!

Better graphics in XBox360 than in PlayStation3 ?

Today, watching some videos in one of my favourite sites, I´ve found a comparison between Assassin´s Creed for XBox360 and PlayStation3.

Link: http://www.gametrailers.com/game/2581.html




It´s quite impressive to see that XBox360 beats the PS3 up in this game. Some people say it´s just a contrast or gamma adjustment issue, but I don´t think so. We must trust the GameTrailers people to be professional and to have made the comparison with the same adjustments.





In the XBox360 version there´s more detail and, to my eyes, there´s some cool HDR which doesn´t appear in the PS3 version (see picture above).



It´s true that consoles need some time to do their best, and the PS3 is much younger than the XBox, but for the same reason, it also has better hardware (in theory).


Who knows...

XNA Image Reflector. Easily create web 2.0 reflected images

In the last months or years, every single power point I see, with a decent design and look, includes pictures that have been "reflected" vertically, as if they where in the top of a reflecting table or so... it´s the so-called "web 2.0 reflection". Just like this one:


This kind of effect can be easily done with Photoshop or whatever, just reflecting the image and aplying a distort and a gradient mask, but hey! those 5 minutes per image are priceless! So I decided to make a small app that allows you to create this kind of effect in 5 seconds.

Probably there´s already something similar out there (see below), but I do it just for fun and to practice some new things I´m explaining below. I will upload the source code here or at TheCodeProject, so you all can check how it´s done.

Specs:
  • Automatic reflection using a reflection polygon to specify the shape of the form to reflect
  • Automatic reflection distortion
  • Automatic alpha gradient with different gradient modes
  • Image resizing and re-locating
  • Post-processing effects for reflection: Blur, Alpha Texture, ...
  • Supports following formats: BMP, JPEG, TGA, PNG, DDS, DIB, HDR, PPM, PFM

Technical info:

  • Developed in Visual C# Express
  • All the maths and graphics done with XNA
  • Shows integration between XNA and Windows Forms

An example:

1.- Take the original picture:


2.- Apply my XNAImageReflector: with blur post processing turned on

As you can see, the cool thing of all this stuff (appart from the post-proc effects) is that you can build a path that will define the shape of the reflection. Not just vertical or horizontal reflections, which are Ok for non-perspective objects, but that doesn´t work well on logos like this one.

3.- Save the final image:

Other examples created with XNAImageReflector:



This one shows the Alpha Texture post processing effect too:

Similar projects and tutorials I´ve found:


Cheers!







XNA easy and efficient primitive rendering (PrimitiveBatch)

Recently, I got into the situation where I had to render a simple line in a 2D view, in XNA. As the fixed func. pipeline is no longer available, in order to do so you would have to deal with a shader. Probably a BasicEffect or another one created to render 2D lines.

I just googled up for "xna 2d rendering" and I´ve found this article in ZiggyWare (a must for any XNA developer). It shows how to do some basic collision detection between polygons, but as far as it also renders those polygons with lines, I was interested on it.

To draw all the lines there, he uses the PrimitiveBatch class, a very helpful class developed in one of the XNA samples available here, that I honestly didn´t take the time to look at. It behaves in a similar way as the SpriteBatch, basically:

batch.Begin( primitiveType );

batch.AddVertex( Vector2D);
...
batch.AddVertex( Vector2D);

batch.End();

And that´s it. Easy, ain´t it?

Cheers!

Tetris a.k.a "Cuadrados de Rusia"

Y es que así es como parece que conocen en China al Tetris.


Yo ya sabía que era un juego adictivo, porque me dejaba casi todas las monedas de 25 pelas que componían mi paga en la jodía maquinilla, pero es que esta noticia me ha dejado "pa'llá":


Una anciana china de 72 años, adicta a los vídeojuegos desde hace dos décadas

La colega (se llama Liu Zhi), que se inició en este aciago mundo con el Tetris, empieza a jugar a las 9 de la mañana y termina a las 10 de la noche, y si no la vigilan, se olvida hasta de comer.


No me quiero imaginar qué nivel de experiencia tendrá en el WOW ! Debe ser la portadora de la "espada de las mil verdades".


Juas !....

TechEd 2007. More C# 3 features. Object and collection initializers

Another great feature of C# version 3, shown in the TechEd today and yesterday is Object Initializers.

Working as expressions, we can create and initialize objects in a single statement. Imagine we have a class Provider, with properties Name and email. We can do the following:

Provider prv = new Provider() { Name="Microsoft", email = "microsoft@microsoft.com" }

That will create the object and initialize every property we include between the brackets.

In a very similar way work the Collection Initializers, where we can add new items to a collection in the same statement we create it:

List list = new List()
{
new Provider(),
new Provider(),
....
}

And those two features can be nested in the following way:

List list = new List()
{
new Provider() { Name="Microsoft", email = "microsoft@microsoft.com" },
new Provider() { Name="AMD", email = "amd@amd.com" },
....
}

Cheers!

TechEd 2007. .NET Language Integrated Query (LINQ)

The last session I attended on monday was:

The .NET Language Integrated Query (LINQ) Framework

by Luca Bolognese (Senior Program Manager, Microsoft).

For anyone thas has worked in data access components, software, or have struggled at anytime with databases, this represents a huge step forward in terms of productivity, robustness, understandability, and efficiency.

I´m no expert in such issues but, to my eyes, it´s just as if you could write SQL sentences right in the middle of your C# code, combined with the power of .net of course. In addition to that, LINQ can work against almost any kind of data source (SQL data bases, xml, arrays, collections, etc), and serve as well as a datasource for dataBinding.

An example:

[Assume "names" is a collection of strings, an array or whatever]

List<string> query = from s in names
where s.Length == 5
orderby s
select s.ToUpper();

The full LINQ sentence is evaluated as a single expression, but is executed in steps. First, every string in "names" is selected and returned to the second sentence. This one applies a filter selecting those with length == 5 and returns another collection, which is ordered in the third sentence. And so on... as complex as you may need.

I asked Luka how the debugger behaves in this sentences, and he said that LINQ sentences are watched in a special window which allows to see each step of the execution. This is something I´m definately waiting to try.

Just as a last note, LINQ doesn´t always behave this way, as this would be very inefficient. If the collection it´s parsing is just that, something that implements iEnumerable, it behaves so, parsing each element in the collection, iterating through the full array.

BUT, the interesting thing is: if the collection being parsed also implements iQueryable, it behaves differently, building a full query from the LINQ sentences and executing it, as once, at the end. This obviously would make debuggin more difficult, but is the efficient way to execute certain types of queries.

Cheers!

TechEd 2007. VStudio 2008, C# 3, Automatic Properties

Just following the previous post, I keep talking about the session by Daniel Moth (http://www.danielmoth.com/Blog ), yesterday in the TechEd.

He showed another C# 3 new feature that is extremely useful: Automatic Properties.

You not tired about writing something like this?

private int mNumCustomers;
public int NumCustomers
{
get{return mNumCustomers;}
set{mNumCustomers = value;}
}

This is a pain in the ass... You are supposed to use properties, to be clear, clean, robust, elegant, and a good christian, but writing them is painful. Yes, refactoring helped quite a bit, but it´s still something... don´t know... slow and uncomfortable.

Well, Microsoft says that is there to make us more productive, as there it is:

Automatic Properties a.k.a JustWriteThis:

public int NumCustomers{get; set;}

The language will take care of creating the private equivalent variable, just for us. We don´t need to write it. Just specify if you want the get and set, the get only, etc, and there it is!

Again, more productivity...

TechEd 2007. VisualStudio 2008, C# 3, MultiTargeting and Anonymous Types

Yesterday, from 16 to 17:15, Daniel Moth (http://www.danielmoth.com/Blog ) introduced the new features of VStudio 2008 and .Net Framework 3.5. It was a very impressive session, fun and interesting.

Specially exciting the new multi-targeting feature of VStudio 2008. It´s a way to tell the environment which .Net Framework version your project will target, through the project´s properties window. Just selecting in a comboBox if it targets version 2.0, 3.0, or 3.5. By selecting one of them, all of the version features are enabled or disabled for your project, and it´s possible to switch between them without loosing work. Your project will just adapt to that perfectly.

Just as a tip, VStudio 2008 finally has the option "Open folder in windows explorer" in the context menu of the solution explorer... Yeeeeeaaahhhh ! Cannot imagine why something that simple didn´t appear before. No more navigating to bin\debug folder....

Also found quite interesting some of the new C# 3 features, like anonymous types. Didn´t you find redundant something like this before?

Form f = new Form();

Why do I have to say that "f" is a windows form twice? No more, just write something like this:

var f = new Form();

And the compiler will infer that "f" is a windows form just reading the code on the right part of the sentence. It´s important to mark that this has no performance impact, as it´s just a compiler feature. Each time you compile, the MSIL code generated will definately contain the declaration in the old way. It´s just a helper right there for you, just to be more productive. And of course it works with anything:

var a = 5;
var a = 5f;
var a = new Class1();
var a = "";

Great!

TechEd 2007. KeyNote by S. Somasegar

Yesterday, at 14:00 we attended the keynote of the TechEd2007, by Microsoft´s developer division corporate vice-president, Mr. S. Somasegar.



He presented the new key features of Microsoft developments plattform: VisualStudio 2008, .Net Framework 3.5, SilverLight, the Expression Studio tools, etc.


To summarize, he presented an important part of what we are going to see in deeper detail through this next days.

More later...

TechEd Barcelona. 2007


Tomorrow I´m traveling to Barcelona to attend the Microsoft TechEd Developers 2007. I´d be glad to meet you there if you also attend.
I´ll try to post session comments here too, at the end of each day.
Cheers!
-----
Mañana viajo a Barcelona para asistir al TechEd Developers 2007 que Microsoft organiza esta semana.
Estaré encantado de veros por allí si estáis, y también trataré de postear comentarios, impresiones o resúmenes de las sesiones a las que vaya asistiendo.
Saludos!