Hi!
I just got this amazing device and i started playing with it a little bit. I would like to read the values of the sensors using Visual Studio, either C#, or VB, but i didn't see anything.
All I found was a library called eZ430ChronosNet.dll from here (http://sourceforge.net/projects/ez430chronosnet/files/) but it doesn't have any information about how to use it.
Does anyone have any idea how to communicate with the Chronos ez430 using Visual Studio?
Thanks.
It's been some time since I looked at it but I believe the code for TI's own software was available when the access point software was installed. Look at the shortcuts or in the folder where it's installed. It might be in C# or something similar.
In any case you can create your own code. The chronos is connected to the PC and its USB chip results in a virtual com port. This can be opened. Look online for serial com port communications. You'll need to interpret this information.
There was a thread around that described some of the chronos' access point commands that are used.
GL
Thank you Gustavo,
I checked in the installation folder as you told me, but the only example I found is for IAR, so it is not very useful.
As you said, the AP creates a regular Serial port to be used with 115200 8N1, but I guess there is some kind of protocol to connect with the chronos... thats where I get stuck... Am I right or I'm missing something here.
Where should i look for this protocol?
Thank you again Gustavo!
The thread I was referring to is:
http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166/t/32714.aspx
The guys here are parsing the raw bytes into the protocol. It's a good effort but it takes time to put everything together.
The IAR code you mention is the code for either the End Device or the Access Point(which is not msp430 but rather a cc1111 device). I was referring to the code here:
Texas Instruments\eZ430-Chronos\Control Center\GUI Sources
There are files in Texas Instruments\eZ430-Chronos\Control Center\GUI Sources that are called BM
In \eZ430-Chronos\Control Center\GUI Sources\DLL\BM_Comm there is a VC project file that I assume is for visual studio. This should be the source for the control panel application, which seems to me to be the source. If this is true, I would not understand why people would try and parse the control panel application commands unless the important stuff was in the dll.
Let me know how it goes.
Okay, thats much better!!!
I cant open those files right now because i´m at work and I dont have VS here, but Ill do it tonight and tell you how it goes... I would never suspect those files were there... HAHAHA. Thanks!
Hi Angel!
I work with Microsfot Visual Studio 2010 too.
Try read the informations that you kit sends using the SerialPort Object.
You can find it in the ToolBox working with VB and with C#. Is easy to use.
Regards!
Wesley Vergilio Galiotti de Oliveira Hi Angel! I work with Microsfot Visual Studio 2010 too. Try read the informations that you kit sends using the SerialPort Object. You can find it in the ToolBox working with VB and with C#. Is easy to use. Regards!
Yeah, that was my plan, so before starting to play with it, I opened a serial port and I didnt see any data sent to the chronos... thats why I thought that some command should be sent to the chronos in order to start the communication.
Wesley, do you have any document describing the communication protocol with the Chronos?
Sorry Angel. I don't work with Cronos. I'm using Stellaris Cortex M3 devices as hardware. I'm using Visual Studio to do the comunication, works well.
Can you send me the link with the features of your kit? Let's see the source code and discover wht's up.
Try program a simple Uart Echo app only to test the serial comunication.
In Visual Studio how you catch the Serial values? I use Multithreading and Delegates to catch the data icoming in Serial Port.
Regards.
I've also used the ez430 .net library and so far i've only been able to get button presses in vb.net.
This is what i used.
First i import the library
Imports eZ430ChronosNet
then i declare an object
Dim ez As New eZ430ChronosNet.Chronos
this variable gets the status of the AP
Dim status As eZ430ChronosNet.APStatus
i get the port name to pass as a parameter
Dim p As String
p = ez.GetComPortName
ez.OpenComPort(p)
Now that the comport is open you have to start the simpiciti stack
ez.StartSimpliciTI()
and to get the button presses I did this
Dim data As UInteger Do ez.GetData(data) If data = 18 Then Console.WriteLine(" * Pressed ") Console.Beep(100, 20) Console.WriteLine(status) ElseIf data = 34 Then Console.WriteLine(" # Pressed ") Console.Beep(200, 20) Console.WriteLine(status) ElseIf data = 50 Then Console.WriteLine("Up Pressed ") Console.Beep(300, 20) Console.WriteLine(status) End If Loop Until status = APStatus.HW_NOT_CONNECTED = False
now for some reason this above line does not work and the loop goes on forever and i don't know how to stop it . I was planning to have the loop interrupted when you stop the watch from transmitting but no luck.
The lack of documentation for the library is a big drawback, but i hope to work on it some more when i have time.
If you do anything more with the library please post it here.
Yiannis,
Thank you so much for your help! I actually made it work yesterday night,
I'll send you here the code to get all the information from the chronos using that library.
Anyway, I'm working on compiling TI's dll for VS 2010... for some reason it seems like we are missing some libraries there.
This starts being very exciting!
Okay, I made it work!
Here you have a whole project in VB.NET (VS 2010)
http://www.tupperbot.com/?p=105
Thank you all for your help!
It has been a very productive night, so here is another example of what you can do with Visual Studio, the ez430 and a robot.
http://www.tupperbot.com/?p=114
I am glad I could help!!
By the way, do you have a VS2008 version of your code??
I don't have VS2010 yet, so I can't try it.
hmmm... no, I just made it in VS2010, but im pretty sure you can just copy and paste the code, put the components on the form with the same name and it should work...
I'll try it with VS2010 express.
thats how i did it