Read Debug.Print() output without Visual Studio
#1
Posted 08 April 2011 - 09:24 AM
#2
Posted 11 April 2011 - 08:57 PM
#3
Posted 11 April 2011 - 09:30 PM
Copy the contents in "C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Tools" to the PC and start mfdeploy.exe
Select the device (USB->Netduino_Netduino) and press F5.
That's one way. The other way is to use serial deployment and a terminal client. Get your netduino connected serially to the PC and follow the instructions at this thread.
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#4
Posted 12 April 2011 - 06:27 AM
#5
Posted 12 April 2011 - 01:28 PM
Chris, I want to know how to do that ...You can also hook into the MFDeployEngine (the same thing that MFDeploy does) and tap into the Netduino's Debug.Print USB output stream.
I want to start playing with Accel/Magneto/Gyro sensors and display on screen the resulting position/velocity ... (saw it many times but still wonder how to do it) ... graphically at that too ... any suggestions ?
#6
Posted 17 September 2012 - 10:24 PM
The PC part:
- add reference to C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Tools\MFDeployEngine.dll
- add reference to C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Microsoft.Build.Utilities.v4.0.dll
- target to .NET Framework 4 (not .NET 4 Client Profile)
Code draft (it's just a simple Windows Form with a textbox on it):
using System; using System.Collections.Generic; using System.Windows.Forms; using Microsoft.NetMicroFramework.Tools.MFDeployTool.Engine; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); using (MFDeploy mfd = new MFDeploy()) { IList<MFPortDefinition> portDefs = mfd.EnumPorts(TransportType.USB); dev = mfd.Connect(portDefs[0]); dev.OnDebugText += new EventHandler<Microsoft.NetMicroFramework.Tools.MFDeployTool.Engine.DebugOutputEventArgs>(dev_OnDebugText); } } MFDevice dev; void dev_OnDebugText(object sender, Microsoft.NetMicroFramework.Tools.MFDeployTool.Engine.DebugOutputEventArgs e) { MethodInvoker action = delegate { textBox1.Text += e.Text; }; textBox1.BeginInvoke(action); } private void Form1_FormClosed(object sender, FormClosedEventArgs e) { dev.Dispose(); } } }
and every Debug.Print in Netduino code will update the textbox.
Of course production app needs some code to manage connection issues (e.g. no device connected).
It should be quite easy now to send specific data records from .NET MF to "full" .NET Framework on PC using USB 9at least one way).
--
Kind Regards,
Jarek Andrzejewski
P.S. Hello, Netduino Community (it's my first post).
Kind Regards,
Jarek Andrzejewski
#7
Posted 18 September 2012 - 06:09 AM
Hi Jarek and welcome to the community! Nice first post!Kind Regards,
Jarek Andrzejewski
P.S. Hello, Netduino Community (it's my first post).
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#8
Posted 18 September 2012 - 06:14 AM
#9
Posted 18 September 2012 - 04:23 PM
You can also hook into the MFDeployEngine (the same thing that MFDeploy does) and tap into the Netduino's Debug.Print USB output stream.
Chris
Suggest looking at this http://msdn.microsof...ce_members.aspx
There is an event you can capture Debug Text.
Update: Ah, too late, already a program above
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users