EricO's Content - Netduino Forums
   
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.

EricO's Content

There have been 11 items by EricO (Search limited from 29-March 23)


By content type

See this member's

Sort by                Order  

#56159 Unable to communicate with Mini

Posted by EricO on 18 February 2014 - 03:25 AM in Netduino Mini

I discovered the (or source of) problem.  Looks like the usb power was insufficient.  I left the usb cable attached and plugged in a 5V power source, voilà, communication established.




#56158 Unable to communicate with Mini

Posted by EricO on 18 February 2014 - 12:31 AM in Netduino Mini

 Just received my Netduino mini. I snapped it in a Parallax BOE/usb, installed the latest 4.2 of the .netmf & netduino sdk and tried a small test app, no luck.

 

The board appears as COM 4 on my laptop.  I tried MFDeploy, but no luck.  When I'm trying to deploy my test app or trying to ping using MFDeploy, I can see the leds on the BOE flashing but I'm not communicating with the mini.

 

Advice appreciated.

 

Thanks




#53264 NP2 Bricked?

Posted by EricO on 18 October 2013 - 08:26 PM in Netduino Plus 2 (and Netduino Plus 1)

While trying new code to get my Parallax Ping Distance Sensor to work, it now appears my NP2 is toast. 

 

While attempting to download my code to the device, it hung.  I disconnected the usb cable and my computer instantly rebooted (that was a little scary).  After that happened and my computer appeared to be ok, I reconnected the NP2.  It's recognized in Windows 7 under Control Panel -> Devices and Printers' but not in the Device Manager (it no longer takes a com port). I launched DfuSe Demo, hoping it may see it but no luck. When disconnecting the usb cable again another computer reboot (different usb cable).  I tried reconnecting the NP2, holding the reset button to put it in program mode and I was able to erase it with DFU.  I was successfully able to reflash it with 4.2.2 and I thought I was back in business, apparently not. I tried erasing and reflashing once more but no luck, it won't obtain a com port.

 

It's kind of annoying.  For fifty bucks, I would have liked to seen it function more than a couple times but, oh well.  Fortunately, it didn't appear to harm my computer.




#53263 Parallax - Ultrasonic Distance Sensor does not work

Posted by EricO on 18 October 2013 - 08:06 PM in Netduino Plus 2 (and Netduino Plus 1)

I tried your code, but no success.  Now it looks like my NP2 is bricked anyway so I guess won't  be going any further with it.

 

Thank you again for your assistance.




#53242 Parallax - Ultrasonic Distance Sensor does not work

Posted by EricO on 17 October 2013 - 05:16 PM in Netduino Plus 2 (and Netduino Plus 1)

Thank you for the reply.  Yes, it is the Parallax Ping))). I suspect you're write about the port settings, looking at my Arduino code, which does work, I notice they handle the port quite a bit differently than the code I was using.  At any rate, I'll give your code a try and let you know.

 

Thank you again.




#53232 Parallax - Ultrasonic Distance Sensor does not work

Posted by EricO on 16 October 2013 - 10:59 PM in Netduino Plus 2 (and Netduino Plus 1)

I have an NP2 connected to a Parallax BOE Shield and a Parallax Ping Ultrasonic Distance Sensor. The ping sensor is connected to the BOE shield using the 5V pin and the Gnd pin right next to it, I've tried multiple I/O pins but no success with the ping sensor.  To ensure the ping sensor was working, I connected it to another Parallax board I have and it worked fine. Below, is the code I'm using for the NP2, I found it on this forum.  I've read where some have had success with it and others have not. Not knowing what to try next, I swapped out the NP2 with an Arduino uno and left the ping sensor exactly how I had it connected on the BOE shield.  It worked with no problems.

 

I'd still like to give the NP2 a chance but I don't know what to try next. Suggestions are welcome.

 

Thank you.

 

_________________________

 

using System; using System.Threading; using Microsoft.SPOT; using Microsoft.SPOT.Hardware; using SecretLabs.NETMF.Hardware; using SecretLabs.NETMF.Hardware.Netduino;

namespace ParallaxSensors {   /******************************************************************* * Reference the following DLLs *  - Microsoft.SPOT.Hardware *  - Microsoft.SPOT.Native *  - SecretLabs.NETMF.Hardware *  - SecretLabs.NETMF.Hardware.Netduino ******************************************************************/

  /// <summary>   /// Holds the distance information for the event   /// </summary>   public class PingEventArgs   {   public PingEventArgs(int distance)   {   Distance = distance;   }

  public int Distance { get; set; }   }

  /// <summary>   /// Implements a timer based distance measurement of distance (in cm) using the   /// parallax Ping sensor   ///   /// Example usage:   /// public static void Main()   /// {   /// Ping ping = new Ping(Pins.GPIO_PIN_D2, 1000, true);   /// ping.RangeEvent += new Ping.RangeTakenDelegate(ping_RangeEvent);   ///   /// // Sleep forever!   /// Thread.Sleep(Timeout.Infinite);   /// }   ///   /// static void ping_RangeEvent(object sender, PingEventArgs e)   /// {   /// Debug.Print("Range: " +  e.Distance + " cm");   /// }   /// </summary>   public class Ping   {   public delegate void RangeTakenDelegate(object sender, PingEventArgs e);   public event RangeTakenDelegate RangeEvent;

  private TristatePort _port;   private ExtendedTimer _timer;   private int _period;   private bool _enabled;

  /// <summary>   /// Constructor: initializes the Ping class   /// </summary>   /// <param name="pin">which pin the sensor is connected to</param>   /// <param name="period">time between pulses in millisec, minimum of 1000</param>   /// <param name="enabled">if true, start pinging immediately, otherwise wait for enable</param>   public Ping(Cpu.Pin pin, int period, bool enabled)   {   _port = new TristatePort(pin, false, false, ResistorModes.Disabled);

  // Initially set as disabled.   _timer = new ExtendedTimer(TakeMeasurement, null, Timeout.Infinite, period);

  // Store the current period   Period = period;

  // Set the enabled state   Enabled = enabled;   }

  /// <summary>   /// Enable or disable the timer that triggers the read.   /// </summary>   public bool Enabled   {   get { return _enabled; }   set   {   _enabled = value;

  _timer.Change((_enabled) ? 0 : Timeout.Infinite, Period);   }   }

  /// <summary>   /// Set the period of pings, min is 1000ms   /// </summary>   public int Period   {   get { return _period; }   set   {   _period = value;   if (_period < 1000)   _period = 1000;

  // Set enabled to the current value to force update   Enabled = _enabled;   }   }

  /// <summary>   /// Get distance in cm   /// </summary>   /// <returns>distance in cm, based on wikipedia for dry air at 20C</returns>   private int GetDistance()   {

  // First we need to pulse the port from high to low.   _port.Active = true; // Put port in write mode   _port.Write(true); // Pulse pin   _port.Write(false);   _port.Active = false;// Put port in read mode;  

  bool lineState = false;

  // Wait for the line to go high, for start of pulse.   while (lineState == false)   lineState = _port.Read();

  long startOfPulseAt = System.DateTime.Now.Ticks;   // Save start ticks.

  // Wait for line to go low.   while (lineState)   lineState = _port.Read();

  long endOfPulse = System.DateTime.Now.Ticks;   // Save end ticks.

  int ticks = (int)(endOfPulse - startOfPulseAt);

  return ticks / 580;   }

  /// <summary>   /// Initiates the pulse, and triggers the event   /// </summary>   /// <param name="stateInfo"></param>   private void TakeMeasurement(Object stateInfo)   {   int distance = GetDistance();

  if (RangeEvent != null)   {   RangeEvent(this, new PingEventArgs(distance));   }   }   } }




#52889 SDK documentation for the Netduino SDK

Posted by EricO on 25 September 2013 - 02:19 AM in Netduino Plus 2 (and Netduino Plus 1)

Same here.  It's a little hard to know what's available.




#47039 NP2 reboots on deploy; never debugs/runs app

Posted by EricO on 11 March 2013 - 10:47 PM in Netduino Plus 2 (and Netduino Plus 1)

I was able to get past the 'target is not in an initialized state...." problem when using 4.2 and VS2010 by upgrading to VS2012 and using 4.3 of the MF and sdk.




#46951 NP2 reboots on deploy; never debugs/runs app

Posted by EricO on 09 March 2013 - 09:30 PM in Netduino Plus 2 (and Netduino Plus 1)

I'm having the same issue.  Flashed my N+2 to 4.22 and now anytime I run the app through the debugger, I get the 'target is not in an initialized state, rebooting"  and that's it.  The process no longer is running in the debugger.

 

I'm running VS2010.




#46089 NP2 vs. Arduino

Posted by EricO on 22 February 2013 - 08:00 PM in Netduino Plus 2 (and Netduino Plus 1)

I've got similar background :-) I have both Arduino Uno R3 and Netduino Plus 2.

The main issue is that Uno has 5V I/O whereas N+2 has 3.3V I/O. In digital mode they are compatible - N+2 can stand 5V and 3.3V is HIGH on Uno. But watch out when you are using analog (especially inputs) on N+2.

For example I had this is a problem when using 16x2 LCD Shield buttons - there is one analog input for 5 buttons and each button causes some known voltage drop. When no button is pressed, there is 5V on A0. In theory you may damage N+2 this way, but some guys on this forum tried that and said N+2 can stand 5V. But still some buttons will not work.

 Great feedback, thank you.




#45992 NP2 vs. Arduino

Posted by EricO on 21 February 2013 - 07:51 PM in Netduino Plus 2 (and Netduino Plus 1)

I'm am brand new to working with microcontrollers, so if my terminology is off or my questions don't make a lot of sense, please understand.  I recently bought the NP2, primarily because it uses the .Net MF. I have several years of experience with .net/c# and thought it would probably be as good of a place to start as any. 

 

My topic title might be slightly misleading, I'm not looking for a discussion of the merits of one over the other, what I'm after is some information about the differences schematically. There are a lot more reference materials and books about the Arduino and I found one that covers a topic I'm interested in but it's for the Arduino.  So, my question is, when I'm following examples in the book, how close or different will board specific references be? 

 

Also, are Arduino expansion shields compatible with the netduino? e.g. motor shields, network shields, etc.

 

TIA





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.