Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Go ports problem


  • Please log in to reply
14 replies to this topic

#1 AlThar

AlThar

    Member

  • Members
  • PipPip
  • 11 posts

Posted 28 January 2013 - 02:13 PM

Good day.

 

I got a weird condition. When i plug my netduino go into usb port, blue leds (8 of them) are shining for a moment (as the must do, i beleave). But NOT all of them. leds 1 and 2 do not shine. Only 3-8 do. 

How can i fix this. 

 

Also when i run the application 

using Nwazet.Go.Fonts;using Nwazet.Go.Helpers;using Nwazet.Go.Imaging;using Microsoft.SPOT.Hardware;using SecretLabs.NETMF.Hardware;using SecretLabs.NETMF.Hardware.NetduinoGo;namespace NetduinoGo{    public class Program    {        public static void Main()        {                        NetduinoGo.Potentiometer p = new Potentiometer(GoSockets.Socket1);            while (true)            {                double val = p.GetValue();            }        }    }}

 

My C# Visual Studio 2010 express shows a message (in the bottom status panel), "The debugging target is not in an initialized state. Rebooting."

What is this suppose to mean?

 



#2 Gutworks

Gutworks

    Advanced Member

  • Members
  • PipPipPip
  • 363 posts
  • LocationOttawa, Ontario

Posted 28 January 2013 - 02:34 PM

Hi AlThar and welcome to the Netduino community!

 

This is a known side effect of the latest firmware version, however it does not affect the code or modules plugged into that port as I believe the blue GoPort LED will come on once the module that's plugged into it enumerates. This will be corrected in future firmware release.

 

The message "The debugging target is not in an initialized state. Rebooting." is a normal message during the debugging process, just before it deploys the code to your Netduino. Shortly after this message you should start seeing information in the Visual Studio Output window and your application running on your Netduino. 

 

Cheers,

Steve



#3 AlThar

AlThar

    Member

  • Members
  • PipPip
  • 11 posts

Posted 28 January 2013 - 02:41 PM

Thanks, Steve.

 

I also have a problem, when i try to use touch display (Nwazet).

My code doesn`t even use anything but potentiometer, here:

using System;using System.Threading;using Microsoft.SPOT;//using Nwazet.Go.Display;//using Nwazet.Go.Display.TouchScreen;//using Nwazet.Go.Fonts;//using Nwazet.Go.Helpers;//using Nwazet.Go.Imaging;//using Nwazet.BmpImage;using Microsoft.SPOT.Hardware;using SecretLabs.NETMF.Hardware;using SecretLabs.NETMF.Hardware.NetduinoGo;namespace NetduinoGo{    public class Program    {        public static void Main()        {            //var canvas = new VirtualCanvas(null, null);            //canvas.Initialize(GoSockets.Socket2);            //canvas.SetOrientation(Orientation.Landscape);                        //canvas.Execute();            NetduinoGo.Potentiometer p = new Potentiometer(GoSockets.Socket1);            while (true)            {                double val = p.GetValue();            }        }    }}

 

This code works ok, when i dont have a reference to Nwazet.Go.Core.dll or Nwazet.Go.SDT028ATFTLCDTS.dll

But if i add this reference (dont use in my application, just add reference it`s self) my application doesn`t work. Just starts and finishes.

Why can it be? How can i use touch screen, if i can`t eve add reference to it`s dll?



#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 28 January 2013 - 03:50 PM

Hi AlThar, has your issue been solved? I just saw your other thread and it looks like you're up and running now--but I wanted to make sure. As far as the Nwazet DLLs go, we're not aware of any issues...but if you have troubles please contact the manufacturer Nwazet. If it's something that we can assist them in debugging we'd be happy to do so. Chris

#5 Gutworks

Gutworks

    Advanced Member

  • Members
  • PipPipPip
  • 363 posts
  • LocationOttawa, Ontario

Posted 28 January 2013 - 04:22 PM

I don't believe the issue is really with the Nwazet dlls, but rather with the your Potentiometer constructor. 

 

In your code you are using the following:

NetduinoGo.Potentiometer p = new Potentiometer(GoSockets.Socket1); 

When you define the object type at the beginning you are correctly defining it with NetduinoGo.Potentiometer, however you will need to define the Namespace when you use the constructor as well. So in your code should look like:

NetduinoGo.Potentiometer p = new NetduinoGo.Potentiometer(GoSockets.Socket1); 

 

You can also use "using NetduinoGo;" at the top of your code, and then you no longer have to define the Namespace and can use this in your code:

Potentiometer p = new Potentiometer(GoSockets.Socket1);

 

Also, you may need to define the SPI frequency when using the Touch Display. To do so you would initialize the display as such:

canvas.Initialize(GoSockets.Socket2, 10000); //(10000 kHz == 10MHz)

 

 I hope this helps!

 

Cheers,

Steve



#6 AlThar

AlThar

    Member

  • Members
  • PipPip
  • 11 posts

Posted 28 January 2013 - 07:10 PM

I don't believe the issue is really with the Nwazet dlls, but rather with the your Potentiometer constructor. 

 

In you code you are using the following:

NetduinoGo.Potentiometer p = new Potentiometer(GoSockets.Socket1); 

When you define the object type at the beginning you are correctly defining it with NetduinoGo.Potentiometer, however you will need to define the Namespace when you use the constructor as well. So in your code should look like:

NetduinoGo.Potentiometer p = new NetduinoGo.Potentiometer(GoSockets.Socket1); 

 

You can also use "using NetduinoGo;" at the top of your code, and then you no longer have to define the Namespace and can use this in your code:

Potentiometer p = new Potentiometer(GoSockets.Socket1);

 

Also, you may need to define the SPI frequency when using the Touch Display. To do so you would initialize the display as such:

canvas.Initialize(GoSockets.Socket2, 10000); //(10000 kHz == 10MHz)

 

 I hope this helps!

 

Cheers,

Steve

Well, i got no problems with potentiometer code. 

I just add reference to Nwazet and this code stops work. I remove the dll reference and it works again. Is there a small limit of deploing code? 60kb - size of that dll.

 

To be honest i`m stunned. Don`t know how to figure out that problem.



#7 Gutworks

Gutworks

    Advanced Member

  • Members
  • PipPipPip
  • 363 posts
  • LocationOttawa, Ontario

Posted 29 January 2013 - 01:35 AM

I did try your code and once I added the Namespace to "new NetduinoGo.Potentiometer(GoSockets.Socket1); " I was able to run it, even with the Nwazet dlls added. I was also able to run the code with the Nwazet using statements uncommented, however as noted before you will need to add the SPI frequency to the Initialize method. 

 

Perhaps you are not using the correct dlls. Once you unzip the dlls from the NwazetAssemblies.zip make sure you use the dlls found in the "Release" folder and add them to your project by using "Add Reference".

 

If you try the Touch Displays sample code provided by Nwazet, you will need to change line 55 to:

canvas.Initialize(GoSockets.Socket5,10000);

 

When you do that, can you get that sample running correctly?

 

Cheers,

Steve



#8 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 29 January 2013 - 01:49 AM

Hi AlThar, Do you have the source code for the module driver? If you add that as a project to your solution, and then reference it from your main program, do you get the same error? Also--are you sure that you want your namespace to be "NetduinoGo"? That's valid...but it may cause some confusion in your code. I'd recommend calling your application something a bit different, and then adding "using NetduinoGo;" up top. Chris

#9 AlThar

AlThar

    Member

  • Members
  • PipPip
  • 11 posts

Posted 29 January 2013 - 04:08 PM

Hm... looks like i do something totally wrong. Now i use dll from your link (btw thanks for that link), but still i got my application finished before it does something.

 

Here is my vs 2010 project. 

I added dlls from release folder, initialized Potentiometer as [color=rgb(102,0,102);]NetduinoGo[/color][color=rgb(102,102,0);].[/color][color=rgb(102,0,102);]Potentiometer[/color] p [color=rgb(102,102,0);]=[/color] [color=rgb(0,0,136);]new[/color] [color=rgb(102,0,102);]NetduinoGo[/color][color=rgb(102,102,0);].[/color][color=rgb(102,0,102);]Potentiometer[/color][color=rgb(102,102,0);]([/color][color=rgb(102,0,102);]GoSockets[/color][color=rgb(102,102,0);].[/color][color=rgb(102,0,102);]Socket1[/color][color=rgb(102,102,0);]);[/color]

But it doesn`t work. 

 

Could you send me a link to your project which currently works. 

Thanks a lot, guys.



#10 AlThar

AlThar

    Member

  • Members
  • PipPip
  • 11 posts

Posted 30 January 2013 - 03:19 PM

I still can`t make my touchscreen work. If i add nwazet assembly it (my application) just stops. Don`t use anything from that assembly - just add it. 

Is there any way to communicate with touchscreen without using nwazet library?

And still - could you give me a link to working project using nwazet dlls?

 

Thank you.



#11 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 30 January 2013 - 05:03 PM

Hi AlThar, We ordered a production [nwazet touch screen last night; it should be here in around a week. I'll see if we can track down the source and pull in the C# code to see if it's a compiled assembly vs. source issue. A touchscreen is definitely a cool accessory; let's see what we can do to help you diagnose this scenario. Chris

#12 AlThar

AlThar

    Member

  • Members
  • PipPip
  • 11 posts

Posted 30 January 2013 - 05:16 PM

Thank you very much.

Also i`ll try to create my own library to communicate with touch screen.



#13 Gutworks

Gutworks

    Advanced Member

  • Members
  • PipPipPip
  • 363 posts
  • LocationOttawa, Ontario

Posted 30 January 2013 - 05:51 PM

Hi AlThar,

 

I was able to get the Touch Display sample running using the latest code from the Nwazet bitbuckit repository.  I mentioned where to get the sample earlier but perhaps it was buried in the post.

 

Try downloading it again, and in your unzipped folder find the directory called Samples and then DisplayModule. When you open the solution, change line 55 of the Program.cs file to:

canvas.Initialize(GoSockets.Socket5,10000);

 

The sample contains the source for the dlls and so you won't have to add them to your project. Let me know if that works, and if so then we'll try creating a simple application using the dlls. 

 

EDIT: Also make sure you have your display in GoPort 5 for this sample, or change the code to reflect the port you are using. If the modules are in the correct port, the debugger will exit quickly like you stated above. 

 

Steve


Edited by Gutworks, 30 January 2013 - 05:53 PM.


#14 AlThar

AlThar

    Member

  • Members
  • PipPip
  • 11 posts

Posted 06 February 2013 - 09:12 AM

Solved :)

Thank you, guys.



#15 Gutworks

Gutworks

    Advanced Member

  • Members
  • PipPipPip
  • 363 posts
  • LocationOttawa, Ontario

Posted 06 February 2013 - 12:40 PM

Awesome to hear. Do you know what the issue was? 

 

Steve






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.