I have been looking around and fighting with some libraries for a couple of days to get the watch to send data to the computer… After some help from TI’s forum I finally got it running on Visual Studio .Net writing a quick code in Visual Basic and using the eZ430_Chronos_Net.dll made by Tobias Gärtner.

Untitled-2

I hate all those places where you have to look around to get code and register to download everything, so if you want to download the source code, simply click here and start playing with it.

Follow this steps to make this work:

1. Plug the CC1111 AP
cc1111

 

 

 

 

 

2. Open the program you just downloaded. there should be a .exe in the bin folder.

3. Click Connect

4. Start the Chronos ez430 in ACC mode.

5. and voilà!

I hope this helps people trying to figure out how to “talk to the device using Visual Studio. If you have any questions just leave a comment or send me an email.

26 Responses to “Chronos ez430 and Visual Studio .Net”
  1. Which Mhz versiton of the Chronos watch are you using? Is the 433 MHz version compatible with these files?

  2. This saves me sooooo much work!

    Thanks!

  3. Hi there, Thanks for the code. It worked wonders for me and tested working on VB 2008 too.

    I got a question, now that the data is received, how do I graph it in real time in such a way that it can show a waveform for X and Y and Z similar to the control center?

  4. hi
    thank you for your reference code

    i have question for you

    can using bluerobin function by “eZ430_Chronos_Net.dll” ?

    for example BM_BR_Start or BM_BR_SetHeartrate

  5. hello i want to know if the measure of the sensor can be exploited by transferring them into an array of curves for all 3 axes acceleration. So you know how to see the device measurements after the acquisition? (sorry I’m french so my English is not very good.) Thanks for listening, I hope you can answer me.

  6. deterministic says:

    Hi Mif.

    Your code is really understandable and useful. Thanks for sharing it.

    I plan to use your logic for a different project. In the project, I have to collect accelerometer data in a vector (lets say an array of 100 elements for each axis), and then the vector will be used for a special purpose. I could not achive the collection process (playing with your code) yet.
    Could you help me, please?

  7. I have tried many ways to compile the code. it looks like it should work. I keep getting a {”Object reference not set to an instance of an object.”} error. I had to recreate the objects in the Form to be able to display the fields.
    I am using VB express 2010. the detail for the error is:
    System.NullReferenceException was unhandled
    Message=Object reference not set to an instance of an object.
    Source=eZ430_Chronos_Net
    StackTrace:
    at eZ430ChronosNet.Chronos.SendAndReceive(Packet packet, Int32 receive, Int32 delay)
    at eZ430ChronosNet.Chronos.GetData(UInt32& data)
    at WindowsApplication1.Form1.TimGetData_Tick(Object sender, EventArgs e) in C:\Users\William\Documents\Downloads\Chronos\ez430-VB-NET\Chronos\Chronos\Form1.vb:line 17
    at System.Windows.Forms.Timer.OnTick(EventArgs e)
    at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.Run(ApplicationContext context)
    at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
    at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
    at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
    at WindowsApplication1.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
    at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
    at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
    at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()
    InnerException:

  8. Thanks man. Just what I needed.

  9. Warning 1 Failed to parse the following code:

    Me.components = New System.ComponentModel.Container()

    The code within the method ‘InitializeComponent’ is generated by the designer and should not be manually modified. Please remove any changes and try opening the designer again. 0 0
    Error 2 ‘IContainer’ is ambiguous in the namespace ‘System.ComponentModel’. C:\Users\x0163414\Desktop\Chronos\Chronos\Form1.Designer.vb 18 27 Chronos
    Error 3 ‘Container’ is ambiguous in the namespace ‘System.ComponentModel’. C:\Users\x0163414\Desktop\Chronos\Chronos\Form1.Designer.vb 25 29 Chronos
    Error 4 ‘ISupportInitialize’ is ambiguous in the namespace ‘System.ComponentModel’. C:\Users\x0163414\Desktop\Chronos\Chronos\Form1.Designer.vb 52 31 Chronos
    Error 5 ‘ISupportInitialize’ is ambiguous in the namespace ‘System.ComponentModel’. C:\Users\x0163414\Desktop\Chronos\Chronos\Form1.Designer.vb 313 31 Chronos
    Error 6 ‘Process’ is ambiguous in the namespace ‘System.Diagnostics’. C:\Users\x0163414\Desktop\Chronos\Chronos\Form1.vb 58 9 Chronos
    Error 7 ‘Process’ is ambiguous in the namespace ‘System.Diagnostics’. C:\Users\x0163414\Desktop\Chronos\Chronos\Form1.vb 62 9 Chronos
    Error 8 ‘GeneratedCodeAttribute’ is ambiguous in the namespace ‘System.CodeDom.Compiler’. C:\Users\x0163414\Desktop\Chronos\Chronos\My Project\Resources.Designer.vb 25 6 Chronos
    Error 9 ‘EditorBrowsableAttribute’ is ambiguous in the namespace ‘System.ComponentModel’. C:\Users\x0163414\Desktop\Chronos\Chronos\My Project\Resources.Designer.vb 38 10 Chronos
    Error 10 ‘EditorBrowsableAttribute’ is ambiguous in the namespace ‘System.ComponentModel’. C:\Users\x0163414\Desktop\Chronos\Chronos\My Project\Resources.Designer.vb 53 10 Chronos
    Error 11 ‘GeneratedCodeAttribute’ is ambiguous in the namespace ‘System.CodeDom.Compiler’. C:\Users\x0163414\Desktop\Chronos\Chronos\My Project\Settings.Designer.vb 18 6 Chronos
    Error 12 ‘EditorBrowsableAttribute’ is ambiguous in the namespace ‘System.ComponentModel’. C:\Users\x0163414\Desktop\Chronos\Chronos\My Project\Settings.Designer.vb 19 6 Chronos
    Error 13 ‘ApplicationSettingsBase’ is ambiguous in the namespace ‘System.Configuration’. C:\Users\x0163414\Desktop\Chronos\Chronos\My Project\Settings.Designer.vb 21 18 Chronos
    Error 14 ‘ApplicationSettingsBase’ is ambiguous in the namespace ‘System.Configuration’. C:\Users\x0163414\Desktop\Chronos\Chronos\My Project\Settings.Designer.vb 23 62 Chronos
    Error 15 ‘EditorBrowsableAttribute’ is ambiguous in the namespace ‘System.ComponentModel’. C:\Users\x0163414\Desktop\Chronos\Chronos\My Project\Settings.Designer.vb 31 68 Chronos
    Error 16 ‘Save’ is not a member of ‘WindowsApplication1.My.MySettings’. C:\Users\x0163414\Desktop\Chronos\Chronos\My Project\Settings.Designer.vb 34 17 Chronos
    Error 17 ‘HelpKeywordAttribute’ is ambiguous in the namespace ‘System.ComponentModel.Design’. C:\Users\x0163414\Desktop\Chronos\Chronos\My Project\Settings.Designer.vb 66 10 Chronos

  10. hi,
    i’m able to see the GUI and im able to see the X, Y, Z values.
    i’m not strong in Visual Basic. if i could somehow decode the XYZ values, i would then be able to use these values to talk to a program.
    so, what am i supposed to rite now? i know the basics of VB.
    i need to complete my project, please help me on this!!

  11. Hello all, I´m sorry I didn’t reply before, so let me go one by one here:

    1. Zach, I do have the 433MHz indeed. but this software is compatible with any Chronos frequency since it is just for the computer.

    2. Hugo, I am glad, I hope it was helpful!

    3. Sean, the times I graphed stuff I did it manually playing with lines in a picturebox, but I am pretty sure you can do it better with specific libraries for graphs and so on.

    4. Jerry, in case you are using any bluerobing device yes, you could use those functions for example to talk to one of those sport bracelets. What are you planning to do with it?

    5. Thestic, I guess you want to graph the courves in a similar way Sean is trying to do. I have never done that before in a 3D environment as you describe, but I am positive you can do it with specific libraries.

    6. Deterministic, Thank you for your comment :) The system you are proposing should be pretty straight forward, I am pretty sure I can help you with it if you still need it. just send me an email to angel@tupperbot.com

    7. William, It looks like you are missing some object there, does the Form look like the one in the picture? are you opening the .sln file?

    8. B1063N, Thank you dude!

    9. Saurabh, I would need some more information about your project in order to help you there. I guess this is not just my code there, right?

    10. Surya, this is something I do in my software here:
    'Get the data
    ez.GetData(data)
    LabRawData.Text = data 'this is the raw data sent by the chronos
    LabRawDataHex.Text = Hex(data) 'and this is the Hex version of it

    RawZ = (data >> 24) And &HFF 'direct conversion of every axis
    RawY = (data >> 16) And &HFF
    RawX = (data >> 8 ) And &HFF
    RawButton = data And &HFF 'will be shown only when change occurs

    Thank you all for your comments, please contact me if you need any further help, ok?
    Good luck in your projects!!!

  12. hello bro…..i was trying to add ez430 dll file in my vb6 but it is giving me error ( can not add referance to thiis)..i just click on project->referances->browse->then location->then it is giving error…am i using correct way to add library??

  13. please reply..i need it..

  14. and i was trying to open your project in vb6 but was not opening…

  15. Hi!
    Well… this is a .NET project, so I am afraid you are gonna have to open it using VS2005 or so.

  16. thanks for your reply Mif,
    im not that good in VB, so im gonna try it with simple C code to communicate with the AP.
    its a try again., hoping fr the best!!!

  17. sorry to ask, but if you can give me the entire code to run the project., i can reverse engineer them and learn VB as well as serial communication through VB.
    when this is done i can try out all that i can do with this watch,
    help me on this Mif!!! its a humble request!!

  18. being a beginner i’m trying it out now.,
    the point where i’m struck is, when include a line “imports ez430ChronosNet” im facing an error.
    how to fix this?

  19. hey Mif, i was able to reproduce the VB, learnt a lot lot in VB., got to know the basic stuffs.., think from now on i will be able to proceed!!
    my sincere thanx to you!! i would have struggled a lot, if i would have gone through other means, glad that i proceeded with VB!!
    thanx a lot again man!!!

  20. Thnx for providing a simple and working dll for VS development.
    I would like to use the heartrate function in the watch to display other data. Do you have plans to include the BM_BR_SetHeartrate function in your DLL ?
    This question was already put in this forum I think.
    Thnx again

  21. HI guys. Thanks everyone!

    Somebody knows how to connect two chronos at the same time???

    I´m trying but I don´t know how to change the port com for the second chronos using the DLL NET

  22. I think, actually, the pc only recognizes one of the two cc1111 rf. I have a big problem with this!

  23. Hi Mif, I am trying to build the ez430 chronos control center in VS2008 but I am also having library problems. What did you do to fix the library problems? Thanks.

  24. Hi there,
    I get the idea that the watch communicates with the rf transceiver you’ve received with it, but my question is how did you make it to communicate with the robot? Please help.
    Thanks

  25. Thomas,
    You can communicate with your Robot in two ways.
    –One is to use “CC1111 USB Evaluation Module Kit 868/915″ by Texas Instruments which eliminates the PC. This kit can directly receive the data.
    –Second way is to modify the software which is made in VB.net (made above). You can modify it by putting serial communication into that and you can send serial data to Robot (with wire/wireless) by manipulating the data coming from chronos watch. You can see the video by me in which i am showing how to control the Robot by serial communication.
    Best of luck for project!
    Sanjeev Kumar,

  26. Thomas,
    Sorry, this time video link: http://www.youtube.com/watch?v=fGGeHFrqY4M

Leave a Reply