Archive

Posts Tagged ‘3.0’

MFBasic, Basic Interpeter

May 18th, 2009 Elze No comments

As promissed in the last blog item i’m releasing the sourcecode of the basic interpeter that is used in DreamQuest. I’ve called it MFBasic and made a logo for it ;-)

Not all functions that are available in the DreamQuest version are available (Mostly math functions) are available yet. I didn’t want MFBasic need other libraries. I will recreate those functions later.

It’s released with a GPLv2 licence meaning that you may use the code in your projects (also commercial) but you have to release the code of that creation. If you want to use MFBasic in a closed source project you can contact me trough the contact form.

Some of the supported features:

  • WHILE -> WEND
  • IF, ELSE, ENDIF
  • FOR -> NEXT, STEP
  • Line numbers of QBasic like labels
  • Custom variable names (Variables ending with $ are string variables others are considered floating point)
  • Easy to create custom functions
  • Basic sourcecode is precompiled to run faster

It’s in alpha state right now.. I’m currently working on a State storage to store and restore current running state. Also I will add more functions and hopefully implement arrays

For more information and downloads visit the MFBasic codeplex website: http://mfbasic.codeplex.com/

Categories: Projects Tags: , , ,

DreamQuest

May 16th, 2009 Elze 5 comments

Hi,

It’s been a long time since my last blog, I know, I have been consumed by my work and moving to my new appartment. But now I have some happy news, I submitted my video for the Dare To Dream Different Challange and I also want to share it with everybody.

The project is called DreamQuest. As you can see in the video it’s based on the hobby of geocaching.  With Geocaching people hide objects or letters and then share the GPS location. The object or letter gives a clue what to do next.

You can imagine that hiding stuff in the middle of a city centre can be difficult and not very vandalism proof. Here comes DreamQuest to the rescue. DreamQuest is a mobile device with an internet connection and GPS reciever made to do one thing, run Quests. A Quest consists of information, questions, points-of-interest and a script to glue everything together.

You can design and share your own Quests. The script is made in a simple but powerfull Basic language. This script controls when items appear or hide. This can be done based on location, time, distance, answered questions, etc. etc. You are in full control!

I will release the sourcecode of the project and the basic interpeter as soon as possible!

Here is the video:

 

Update: GM862 Driver released!

March 12th, 2009 Elze 4 comments

Many people asked how I connected the GM862  to my .NET Micro Framework board (For people who don’t know what the GM862 is, the GM862 is a very powerfull GSM Module with build in TCP/IP Stack for GRPS and DUN, SirfStar III GPS reciever, Python Intrepeter, Jammer Detection and many more powerfull functions.) I’ve written a class for this and published this some time ago.

This driver class was  an initial version and I made a lot of changes to it. But I still didn’t like the stability of it, missing on unsolicitated responses like RING and GPS information, loosing track of the state it’s in (DATA/COMMAND or IDLE) etc. So I started writing a new version from scratch.

The biggest changes in the new driver class are:

  • AT Command interface sepperated from the general GM862 class. This class is the base of all communication with the device. It now holds a central FIFO for recieved data and functions to recieve and send lines of text.
     
  • Unsolicitated responses are stored in a special Queue that is handled on a user function instead of a seperate thread. This has the bennefit that you can control the moment that the responses are handled. This helps to make sure the handling doesn’t interfere with some of your block of commands.
     
  • Also unsolicitated responses are fetched from the FIFO to the Queue on execution of a function.So if you want to make sure you get all responses quickly you can run a dummy AT command.
     
  • The functions are split up in "modules". The module now includes the following modules: GSM, GPRS, GPS, TextMessaging and Networking. Networking is in a very early state and only has one command at this moment.
     

Stability seems to be improved a lot. With 3 unsolicitated GPS and GSM Info responses a second the interface kept on invoking commands al night without error.

Download:

The driver class is released as part of the  .NET Micro Framework toolkit. This toolkit was originaly named mschwarztoolkit and build by Michael Schwarz. We’ve decided to join forces to help the MF community. This joining of forces is in a early start but expect great things of it!

The MFToolkit website on CodePlex can be found here: http://www.mftoolkit.net/

Documentation:

There is a demo application included in the solution. Expect more info to come available soon.

 

 

Categories: Just Blog'ing Tags: , , , ,

Debugging Locks and Deadlocks

February 23rd, 2009 Elze 2 comments

Today I found myself in a problem I never guessed I would get into, deadlocks. A deadlock is a situation where one lock is waiting for another lock to clear. But the other lock can’t be cleared until the piece of code that’s currently is waiting for the lock to clear is run. More about Threads and Locks can be found here. And with a little bit of googling ;-)

Problem with deadlocks is the seem quite hard to find, and when found to solve. At the moment my program runs in a deadlock I press the Pauze button in Visual Studio, problem: Visual Studio stops at the position where the program is in the main thread. When using WPF in .NET Micro Framework this isn’t very usefull.

But I managed to find the piece of code that blocks but that doesn’t help a lot eather becouse you can’t see what piece of code currently holds the lock.

Read more…

Categories: Tips-n-Tricks Tags: , ,

AUG AMI DevKit is shipping

February 19th, 2009 Elze 1 comment

Today I got an email from Andres Schloffer that the AUG Ami Development Kit is shipping! This will be my 4th .NET Micro Framework device. I’m still very busy with my Dare To Dream Different project but when I find the time I hope I can test out this new board.

Below you can see everything that is included in the development kit:

AUG AMI Development Kit Contents

For more information visit the product website:
http://aug-electronics.com/Home/tabid/135/Default.aspx

On a side notice. I will be attending the Embedded World 2009 conference in Nurnberg. I’m planning to visit the conference on thursday the 5th. Maybe I will meet some of you there!

For the project progress of the Dare To Dream Different challenge, it’s still going strong but it’s costing a lot of time. I’m looking if I can publish some parts of the code on this website.. I’ll keep you updated!

 

 

 

DateTime Formatter and Numeric Formatter

February 6th, 2009 Elze 1 comment

Number Juggle

The .NET Micro Framework doesn’t support the formatting of it’s bigger .NET brothers. I hope/think it will be supported on the next .NET Micro Framework version but for the mean time I made two formatting classes: One class that formats DateTime objects the second formats numbers.

 

DateFormatter Class:

The DateFormatter Class has one function, the Format function that accepts a Format string and a DateTime object.

The function follows the rules of the strftime function found in PHP. More information about this format can be found on this page: http://nl.php.net/strftime

Example code:

DateTime t = new DateTime(2009, 2, 1, 14, 10, 00);
Debug.Print(ElzeKool.Utilities.DateFormatter.Format("%d/%m/%Y  %C", t));

The DateFormatter Class can be downloaded here: DateFormatter.cs



NumericFormatter Class:

The NumericFormatter Class has one function, the Format function that accepts a Format string and a number.
The function follows the C# Custom Formatting, the specification can be found on MSDN:
http://msdn.microsoft.com/en-us/library/0c899ak8.aspx

The Per mille symbol isn’t supported as this is not included in the UTF8 character set.
Besides the custom formatting strings the function also supports the X,x,D,d numeric formatting specifiers

Example code:

// Outputs 8.6E004
Debug.Print(ElzeKool.Utilities.NumberFormatter.Format("0.###E-000", 86000));

// Outputs 86000
Debug.Print(ElzeKool.Utilities.NumberFormatter.Format("##;(##)", 86000));

// Outputs (86000)
Debug.Print(ElzeKool.Utilities.NumberFormatter.Format("##;(##)", -86000));

// Outputs 00ABCDEF
Debug.Print(ElzeKool.Utilities.NumberFormatter.Format("H8", 0xabcdef));

The NumericFormatter Class can be downloaded here: NumericFormatter.cs

GM862 GSM and GPS Module Class

January 29th, 2009 Elze 9 comments

Telit GM862 ModuleFor my Dare to Dream Different Challenge project I ordered a Telit  GM862 GSM and GPS Module from SparkFun with Serial Carrier board. The GM862 is a very powerfull GSM Module with build in TCP/IP Stack for GRPS and DUN, SirfStar III GPS reciever, Python Intrepeter, Jammer Detection and many more powerfull functions.

The GM862 uses an AT command set that is compatible with regular Modem commands. So the code from this class can be a base for other AT Based devices (Like XBee modules or Bluetooth modules).

The class provided here is an intial version.This version includes: Basic GSM/GPRS/GPS Initialization, Sending and recieving of SMS Text messages and  retrieval of an HTML page.

Usage is very simple as demonstrated in this piece of code:

// Initialize GSM/GPS Device
GM862 = new GM862GPS("COM1");

// Make sure GM862 is in command state
GM862.Escape();

// Wait until GM862 is ready
while (true)
{
        try
        {
                GM862.ExecuteCommand("ATE1", 500);
        }
        catch
        {
                System.Threading.Thread.Sleep(1000);
                continue;
        }
        break;
}

// Store new pinRequest Handler
lock (GM862)
{
        GM862.getRequestedPIN = GM862_pinRequest;
}

You can download the class and an example program here: MFGM862Example.zip

 

Categories: Just Blog'ing Tags: , , ,

New .NET Micro Framework Device from AUG Electronics.

January 29th, 2009 Elze No comments

I blogged about this device earlier. AUG Electronics is working on a new very powerfull .NET Micro Framework Device. At the time of the previous blog the price and the exact details where unkown but are in now! Some details about the board can be found below. It is a very powerfull board with a nice looking OLED screen

The full specifications are:
* Atmel AT91SAM9261 (200 MHz)
* 160 kB SRAM (internal)
* 64 MB SDRAM
* 256 MB NAND Flash
* 3.4” OLED Display 480×272, 24 BPP RGB
* resistive touch screen (SPI)
* capacitive sensor keypad (16 keys, I2C)
* 4 serial Ports (2 RS-232, 1 RS-485, 1 Debug RS-232)
* 10/100 MBit Ethernet Auto-MDI
* I2C Bus
* SPI Bus
* battery backed realtime-clock (I2C)
* several (15) free GPIOs (more depend on peripherals)
* .NET Micro Framework 3.0
* 110 mm x 65 mm x 28 mm
* 102 g (incl. Ethernet and 3.4” OLED display)
* USB Host (*)
* USB Device (*)
* Micro SD-Card slot (*)
* single 5 V power supply
* PowerOverEthernet PoE power supply (optional)

(*) Not ready yet

The price for the development kit wil be EUR 369 excl. VAT and can be pre-ordered on the product website.

 

Categories: Just Blog'ing Tags: , ,

Recieved my Tahoe II Board from Microsoft!

January 29th, 2009 Elze 5 comments

For Round two of the Dare To Dream Different Challange I recieved a package from Microsoft. It includes a Device Solutions Tahoe II, two XBee Modules and a USB XBee Development board. 

My first experiences with the Tahoe II board where very positive. USB debugging goes very fast and i’m impressed with the overall speed of the board. The board has less memory then the GHI boards I used to develop on. I don’t know what for implications this has.

I haven’t tried the XBee modules yet as I don’t need them in my application. When that’s finished I’ll try them. Together with the Bluetooth Modules I’ve ordered from SparkFun.

 

 

Onscreen Keyboard

January 21st, 2009 Elze 3 comments

I can think of many .NET Micro Framework applications that require text input. Jan Kucera has made a control for this using the up/down and left/right buttons to write text. You can find this control on his .NET Micro Framework Examples page.

With the Touchscreen support of MF 3.0 I tought it would be nice to have something like an on screen keyboard like you find on modern cellular phones. I made a simple KeyboardWindow class. When you create a new KeyBoardWindow an keyboard is displayed on the screen with a flickering cursor. Simply tap on the buttons to add a extra char. Shift is supported.

I made a Visual Studio 2008 Solution that encapsulates and demonstrates the class.
You can download it here: MF_OnScreenKeyBoardDemo.zip

I hope it can be usefull for someone!
 

Categories: Just Blog'ing Tags: , , ,