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

how to communicate with usb?the code for netduino doesnt work or plus 2


  • Please log in to reply
3 replies to this topic

#1 weixiongmei

weixiongmei

    Advanced Member

  • Members
  • PipPipPip
  • 68 posts
  • LocationPhiladelphia, Pennsylvania, United States

Posted 06 February 2013 - 10:03 PM

how to communicate with usb?the code for netduino doesnt work or plus 2,can any one provide the code for me please?thankyou



#2 Archimede

Archimede

    Member

  • Validating
  • PipPip
  • 15 posts

Posted 06 February 2013 - 10:50 PM

hi weixiongmei, (sorry for my english)

i am new of this forum and netduino plus but i think that can help you in this case.

i write the step:

Please install in the following order:
1 install visual studio c# 2010 express

2 install sdk framework 4.2

3 sdk netduino

 

then when you wrote the code... after you go on the project click on the Posted Imagelast row -->click the label .NET FRAMEWORK and you change the transport in usb...

I hope that you understand...(sorry for my bad english)

 

exemple code:

using System;

using System.Net;

using System.Net.Sockets;

using System.Threading;

using Microsoft.SPOT;

using Microsoft.SPOT.Hardware;

using SecretLabs.NETMF.Hardware;

using SecretLabs.NETMF.Hardware.Netduino;


namespace

 

ProvaNetduino

 

{

 

public class Program

 

{

 

public static void Main()

 

{

 

// write your code here

 

OutputPort led = new OutputPort(Pins.ONBOARD_LED, false);

 

Debug.Print("Code Exemple");

 

while (true)

{

led.Write(true);

Thread.Sleep(1000);

 

led.Write(false);

Thread.Sleep(1000);

}

}

}

}



#3 weixiongmei

weixiongmei

    Advanced Member

  • Members
  • PipPipPip
  • 68 posts
  • LocationPhiladelphia, Pennsylvania, United States

Posted 06 February 2013 - 11:05 PM

Archimede?you has misunderstanded me,i want to know how to communicate with usb,not  deploy the code,i want to use the usb like using a serial port~~



#4 carb

carb

    Advanced Member

  • Members
  • PipPipPip
  • 352 posts
  • LocationCrystal River, Florida

Posted 07 February 2013 - 02:32 AM

Weixiongmei,

 

You can not use the installed micro USB, it is for power, deployment and debug only.

 

If you want to talk to the Netduino over a serial port you will need something like http://www.adafruit.com/products/284 or http://www.adafruit.com/products/70.

 

If you use the cable approach get one that outputs 3.3vdc not the 5vdc.

 

Read the series from CodeBlack, he has a lot of good information. http://blog.codeblac...ng-Started.aspx

 

By the way welcome to the forum.

 

Chuck






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.