Communication at 115.200bps between Arduino and XBee 802.15.4

clock October 11, 2010 21:50 by author Fabian Tuender

One nice thing to mention thats not clearly noticed in many pages is the communication settings between an Arduino board and an XBee running at 115.200 bps.
Initially with testing I was not able to get the communication working with speeds higher then 38.400 bps. For some reason above this speed packets are not received by the Arduino board. After some searching trough the manual I found a small note in the manual that setting the XBee speed (Command BD) to value 7 (115.200 bps) would actually run the interface speed at 111.111 bps. If you match your Arduino to talk at 111.111 bps it then works fine.



DFRobotShop Rover part 2 - Adding C328R camera

clock September 12, 2010 23:51 by author Fabian Tuender

When adding an C328R camera to the rover it makes it very intresting. To control the camera you need another serial port on the ATmega328 thats not available. To resolve this use the newsoftserial class. It allows you to create a new serial port on digital IO pins. Connect the camera as below

 

Using the C328R camera library you can controll the camera and capture an image from it. Due to the timing issues with higher baud rates you might be limited to 57600 max. I've created a small VB 2010 program that send an asci 'c' to the arduino. It will then init the camera and send the capture command. When the camera returns the data it will call an sub that will forward the data to the serial interface.

Below is the sample beta program with an sample picture shot. As you see, in the program its still up side down, it still needs to be rotated.

 

 

Visual Basic 2010 example program fsRobot.rar (41,60 kb)

Arduino 00-18 example sketch sketch_dfrobot_1.rar (1,35 kb)



DFRobotShop Rover review 1

clock September 12, 2010 22:44 by author Fabian Tuender

When you want to play with the arduino chip you might consider some usefull toy. The tank rover from Robotshop will give you a platform to play with. With the complete set you get:

  • pcb with ATmega328 chip
  • frame for holding tank tracks
  • battery holder
  • Tamiya gearbox and tank tracks
  • 2 XBee modules
  • 1 usb adapter for the XBee module
  • 1 XBee shield to put on top of the rover
  • Solarcharger shield to put on top of the rover
  • LIPO battery

 

The basic assembly of the gearbox and tracks is pretty simpel but does require some attention. Dont forget to look at the manual if your still following the right way os assembling it Wink

 

Altough there is no supplied manual and the manual online is very limited you should be able to assemble the tracks, the frame on the pcb and the gearbox. All put together you should be able to test basic functions of the rover. Download the arduino development software and connect the rover using USB. When asked for an driver look in a subdirectory of arduino software for the driver. By default its programmed to send out the values of the temp and light sensor on board. The 6 bright blue lights make it look very nice in the dark, only pitty it cannot be controlled from the program but only manual by a jumper on board.

 

Second step should be add the solarshield and XBee shield. First install the XBee on the XBee shield and the second XBee on the USB adapter. Make sure you set the jumpers on the XBee shield to XBee instead of USB else the XBee will not recieve the text from the chip but the USB port would be. By default the XBee modules are set for transparent mode at 9600 baud so it should work right away.



ExecuteCaptureRequest failed (0x80092024)

clock January 27, 2010 19:52 by author Fabian Tuender

When testing the User State Migration Tool we found a problem with an windows update. Because it took a long time for me to find a workaround I wanted to post the solution to help others.

When you execute a tast sequence that contains a "Request State Store" action it will always end with an error as below.

 The task sequence execution engine failed executing the action (Request State Store) in the group () with the error code 8228  Action output: ==============================[ OSDSMPClient.exe ]============================== Command line: "osdsmpclient.exe" /capture Client joined to the xxxx domain. Client is a member of the xxxx site. GetAdaptersAddressess entry point issupported. DhcpGetOriginalSubnetMask entry point not supported. Adapter {A20F676E-FE24-4A4E-BAED-008A346A4E3D} is DHCP enabled. Checking quarantine status. Loading client certificates. OSDSMPClient finished: 0x00002024 Failed to import the client certificate store (0x80092024) ClientRequestToMP::DoRequest failed (0x80092024). ExecuteCaptureRequestMP failed (0x80092024). ExecuteCaptureRequest failed (0x80092024).. The operating system reported error 8228: The administrative limit for this request was exceeded.

This is caused by windows update KB974571. Uninstalling this update and preventing it from installing again solved it.



Enable telnet access to Screenplay PRO HD

clock April 9, 2009 02:58 by author Fabian Tuender

When browsing Google for an option to modify the Iomega ScreenPlay Pro HD I found a ScreenPlay Pro wiki and a Realtek RTD1261 wiki with lots of usefull information.

They both mention that you should be able to use telnet to connect to the ScreenPlay but that didn’t work with my version. The following steps describe how you can enable telnet if it doesn’t work. Use at your own risk!

First install the IFS driver to access the Ext2 Linux partition later. During the installation make sure you don’t check the option for read only access, we need to modify a file on the Ext2 partition. Now connect your ScreenPlay using USB and turn it on. In your control panel start the application “IFS Drives” and assign a drive letter to the Ext2 partition.

Browse to the drive and to “\etc” and open the “inetd.conf” file with for example Notepad++. Uncomment the line with telnet and save the file. Go back the “IFS Drives” in your control panel and remove the drive letter. Safely remove your USB drive from windows and start your ScreenPlay again. You will now be able to access it using telnet via the Network.

 



English manual for Run Tec Model 60331/KPPM 57

clock January 29, 2008 19:25 by author Fabian Tuender

After asking the German company if they had the English manual they send it to me. I would like to share it with you guys or girls that where looking for the manual. The layout is a bit difficult to read but hope you can figure out how to use the watch.

Download the English and Danish manual for the 60331 below.

60331_GB+IE+DK_innen.pdf (4,04 mb)



SharePoint EXIF event handler

clock January 27, 2008 19:22 by author Fabian Tuender

Something that's missing from the default installation of SharePoint is sometimes simple; like picture information. When you place a picture in SharePoint it will not tell you anything about the EXIF information stored in the jpeg file. Using the exifworks class created by Michal A. Valášek to read the information from the picture; we can update the SharePoint listitem. There is a small modification in my exifworks class to get correct readings when converting from rational to int16 or int32 values.

When you install the feature it will register itself for the ItemAdded and ItemUpdating event on lists with ListTemplateId number 109 (the picture library). So when you add a picture to the library our code will be called. The ItemUpdating event is still empty but it should be easy to use when you know how to use the ItemAdded event. When the ItemAdded event is fired a bitmap picture is created by reading the drawing from the file in the listitem that has just been added. This bitmap is passed to our exifworks class to read out the properties. Next we pass the property from the exifworks class to our sub to check if the field exists. If the field does not exist it will create the field on the fly, see code below.

Private Sub GetExifProp(ByVal ListItem As SPListItem, ByVal FieldName As String, ByVal FieldType As String, ByVal prop As Object)

Dim SPFI As SPField

If Not ListItem.Fields.ContainsField(FieldName) Then

SPFI = ListItem.Fields.CreateNewField(FieldType, FieldName)

SPFI.ShowInEditForm = False

ListItem.Fields.Add(SPFI)

End If

ListItem.Item(FieldName) = prop

End Sub

   

Public Overrides Sub ItemAdded(ByVal properties As Microsoft.SharePoint.SPItemEventProperties)

Dim BM As New System.Drawing.Bitmap(properties.ListItem.File.OpenBinaryStream)

Dim EW As New ExifWorks(BM)

Dim LI As SPListItem = properties.ListItem

   

GetExifProp(LI, "ISO", "Text", EW.ISO)

GetExifProp(LI, "EquipmentModel", "Text", EW.EquipmentModel)

GetExifProp(LI, "ShotDate", "DateTime", EW.DateTimeOriginal)

GetExifProp(LI, "FocalLength", "Text", EW.FocalLength)

This will result in any property you wish to be added as metadata to your picture.

To install this feature:

  • Download and unzip this feature somewhere locally
  • Create a directory in your features folder (C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES) called myeventhandler. Copy the elements.xml and feature.xml to this directory
  • Register your assembly from the project using: C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\gacutil /i <path to your project>\ bin\Release\myeventhandler.dll
  • Next install the feature: stsadm -o installfeature -filename myeventhandler\feature.xml
  • Now we need to activate the feature on a site you want to use it: stsadm -o activatefeature -filename myeventhandler\feature.xml -url http://www.fabita.nl/test
  • You will now see that the feature is active if you goto the site settings and look under site features.

EventHandler.zip (474,35 kb)



Visual Basic SharePoint webpart (Template)

clock September 5, 2007 19:17 by author Fabian Tuender

In my search for a SharePoint template I could only find templates for C#. There was 1 project for Visual Basic but build with VS2002. I converted the project and rebuild it again in VS2005 and created some basic functions in it to show how you can use the webpart. I am just starting with SharePoint development after some years of visual basic 6 and .net hobby development so any comments welcome!

The webpart shows an htmlbutton, a text box, some text and a textbox with the value you set in the property of the webpart. When you push the Click me button the function Private Sub btnText_ServerClick is called. It will set the value of the textbox to your username.

 

When the webpart is created it will start by calling CreateChildControls() and RenderWebPart. In the render function it will write out the html to show on the webpart as well as it sets the value of the property field to the value you defined in your webpart properties.

 

Download the template or download the project.
To easy test the installation I installed VS2005 on a server together with WSS 3.0. After you build the project you can install the dll in the GAC by running the following command:
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\gacutil /i <path to your project>\ bin\Release\webparttemplate.dll


Update 8.9.2007: Okay; there was something I forgot to tell. You need to modify your web.config file to tell ASP .NET that your assembly is safe. By default the web.config file will be located in c:\Inetpub\wwwroot\wss\VirtualDirectories\80. The project contains a safecontrols.txt file, add the first line starting with <safecontrol to the SafeControls section of your existing web.config file. Add the second line (starting with <add assembly=) to the <assemblies> section.

Next run iisreset (Warning This will stop and start the web service, so its down for a few seconds and takes some more seconds after starting to load again)

The coding is shown below. Have fun with it, I hope it's helpful for your webpart development.
My information source Chapter 19: Beginning Web Part Development and Walkthrough: Creating a Basic SharePoint Web Part

           

Imports System.ComponentModel
Imports System.Web.UI
Imports Microsoft.SharePoint
Imports Microsoft.SharePoint.WebControls
Imports Microsoft.SharePoint.WebPartPages
Imports System.Runtime.InteropServices
Imports System.Web.UI.HtmlControls
Imports System.Xml.Serialization
       

<ToolboxData("<{0}:WebPartTemplate runat='server'></{0}:WebPartTemplate>"), XmlRoot(namespace:="Fabita"), Guid("C19B01AA-4593-4426-87BE-3B4194521CC2")> Public Class WebPartTemplate

Inherits WebPart      

Dim WithEvents btnTest As New HtmlButton
Dim lblDisplay As New HtmlInputText
Dim txtProperty As New HtmlInputText
       

Private Const _defPropertyText As String = "Your webpart property"
Private defPropertyText As String = _defPropertyText
       

<Browsable(True), Category("Web Part Template"), DefaultValue(_defPropertyText), WebPartStorage(Storage.Shared), FriendlyName("Your text"), Description("Your description of the friendlyname")> Public Property DisplayPropertyText() As String

Get
Return
defPropertyText
End Get
Set
(ByVal value As String)
defPropertyText = value
txtProperty.Value = value
End Set
End
Property

Private Sub btnText_ServerClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnTest.ServerClick
Dim user As SPUser = SPContext.Current.Web.CurrentUser
lblDisplay.Value = "Welcome " & user.Name
End Sub

Protected Overrides Sub CreateChildControls()
btnTest.InnerText = "Click me"
Controls.Add(btnTest)
lblDisplay.Value = ""
Controls.Add(lblDisplay)
txtProperty.Value = ""
Controls.Add(txtProperty)
End Sub

Protected Overrides Sub RenderWebPart(ByVal output As System.Web.UI.HtmlTextWriter)
btnTest.RenderControl(output)
lblDisplay.RenderControl(output)
output.WriteLine("<br>Your property")
txtProperty.Value = defPropertyText
txtProperty.RenderControl(output)
End Sub

End Class

VB WebPart.zip (17,42 kb)

WebPartTemplate Project.zip (432,65 kb)



Creating your SharePoint blog site

clock September 3, 2007 19:14 by author Fabian Tuender

When I wanted to start this blog I was wondering how I can remove this top navigation bar. The anonymous user should be limited with options, since most options apply only to users who have access to my site.

Searching the internet I found these posts: SharePoint Blogs Part I: Blog Access Control, Built-In Groups & Anonymous Users, SharePoint Blogs Part II: UI Customization and SharePoint Blogs Part III: Blogging from Word. They are great to get you started with modifying your site and start blogging from Word.

Next mission would be to find out how to modify the form that displays the comments in a post. You can now only enter a title and body but I want to extend that with a name, email, website and body. An option to remember your input would also be nice



Run.GPS Trainer UV RELEASE 2.0.1

clock September 3, 2007 19:09 by author Fabian Tuender

I love to use the Run.GPS software for training while cycling or running. After testing the old version and testing the new beta version; the final version is released. Check the website for more information. Happy training!





Sign in