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.

ErikN's Content

There have been 89 items by ErikN (Search limited from 11-May 23)


By content type

See this member's


Sort by                Order  

#26429 Redacted 00101100

Posted by ErikN on 04 April 2012 - 05:14 PM in General Discussion

Pretty interesting reading let slip from Fabien on Twitter. :)

http://fabienroyer.w...or-netduino-go/



#26296 Redacted 00101100

Posted by ErikN on 03 April 2012 - 03:54 AM in General Discussion

Based on some hints I had awhile back, all I can say is: I'm very much excited to hear a formal announcement! I don't think anyone will be upset by it. :)



#38410 Processing Speed

Posted by ErikN on 03 November 2012 - 06:13 AM in Netduino Go

There are more differences than raw clock speed. The Atmel chip on the Netduino Plus executes code in Thumb mode (for code space optimization). In this way the DMIPS for that chip is 0.9/MHz. I believe the Go can use Thumb2 code which is more efficient for execution while still having a smaller code footprint. I believe the DMIPS rating is 1.25/MHz. If the Go is still running Thumb code then it will have the same DMIPS as the Netduino and in this case it's a simple matter of increased clock speed. If your program is purely computational (CPU bound) then the time to execute should decrease directly proportional to the instruction set efficiency and speed increase. Exceptions would be any situation you're waiting on threads to switch since I believe the time slices in the NETMF are set at 20ms. If you're not using all the time you are given for your time slice, you could be wasting cycles and you won't see as much of a speed increase. Bottom line is it's really hard to figure out performance difference from a pure math perspective. You'll really just need to benchmark your application.



#37130 Problem TCP Recieve Shows in a Textbox

Posted by ErikN on 13 October 2012 - 05:51 PM in Visual Basic Support

So a Label control displays it fine, but Textbox still has a problem with the space? That's really strange but not completely unexpected. The Textbox control is not ... great. You might try converting to ASCII instead of UTF8 and see what the output becomes.



#37096 Problem TCP Recieve Shows in a Textbox

Posted by ErikN on 12 October 2012 - 07:39 PM in Visual Basic Support

If the string has the full message but the textbox doesn't show it, the problem must be there. What data are you sending? Does it contain carriage returns and/or newline characters? If so, make sure the textbox is configured to show multiple lines. Just because the size is large enough to hold the text doesn't mean it's smart enough to show more than the first line. Next try to write out the characters to a file and open it with a hex editor or Word or Wordpad (but not Notepad) to see if there are "special" characters you don't expect in the string. Visual Studio will strip most of these out when you hover over to preview the string value so it will display correctly. But these characters could still exist and the textbox might be confused by them and not interpreting contents beyond them. This is less likely to me as the answer but it's the only other thing I can think of without seeing the actual text you're receiving and trying to assign to the textbox to display.



#37193 Problem TCP Recieve Shows in a Textbox

Posted by ErikN on 14 October 2012 - 10:49 PM in Visual Basic Support

Glad it's worked out!



#38435 Power Outage in New York

Posted by ErikN on 03 November 2012 - 04:11 PM in General Discussion

Some of us were very lucky to have a mild rain and not lose power. Just a few blocks made all the difference for some. Of course we still suffer in our own way - by having to continue to work! It was a small price to pay to keep things running while those who suffered the real damage had the time to recover. I'm grateful those I know around the various parts of the city went mostly unharmed if inconvenienced by the power and service outages. The one exception was a coworker who lives on Long Island - he lost his house ("I have an indoor pool now!") and his 3 cars. He has had to relocate and is working remotely from his son's house. I can't imagine that sort of disruption.



#38268 Power Outage in New York

Posted by ErikN on 30 October 2012 - 11:55 PM in General Discussion

I made it out unscathed too. I had a couple flickers but never lost power. During the worst of the storm I was in Times Square live casting and buying cheesecake. Posted Image



#23538 over run?

Posted by ErikN on 30 January 2012 - 10:59 PM in Netduino Plus 2 (and Netduino Plus 1)

night time here in denmark




I'm going to have to start a list of Scandinavian users! Of which I'll only be an honorary member.


-Erik



#26800 Netduino GO! Touchscreen and Relay modules

Posted by ErikN on 09 April 2012 - 06:55 PM in Netduino Go

I am eagerly awaiting my LCD module! In fact, I just got an email from my apartment building saying I have a UPS package waiting for me when I get home. I have a couple things on order and the tracking info only shows me from where the package was shipped. The anticipation is killing me! It could be my order from [nwazet or fancy shampoo! Edit: Looks like it's the LCD module (and sundry)! But now I need more cables...



#27734 Netduino Go! RGB Umbrella

Posted by ErikN on 20 April 2012 - 06:14 PM in Project Showcase

I think you could pull off the dark wizard look quite easily! I'm interested to see what you come up with. I've seen the "Blade Runner" style umbrellas before but they've always seemed too weak to use in any sort of ambient light. As further ideas, I think having a button to immediately switch to a red and orange swirling pattern would be useful to you. When you get angry you can hold the button down and switch into this mode to look extra menacing. When you've calmed you can release and let the colors go back to swirling through a fuller range of color.



#27761 Netduino Go! RGB Umbrella

Posted by ErikN on 20 April 2012 - 09:58 PM in Project Showcase

+eleventy



#35185 Netduino Go Socket Pins as GPIO

Posted by ErikN on 14 September 2012 - 04:22 PM in Netduino Go

When I compare this to the GoHub.cs file:<br style="color: rgb(28, 40, 55); font-size: 13px; line-height: 19px; background-color: rgb(250, 251, 252); ">

  • The same pins are used for SPI.SPI_module.SPI1 in the sockets 1-4.
  • The same pins are used for SPI.SPI_module.SPI2 in the sockets 5-8.


That's the bus part of GoBus and why, in the early days of Go if you use the Shield Base, you can't use the other ports in that bus. 1-4 share a bus and 5-8 share a bus. (With the new updates, this won't be a problem with the Shield Base but this is to demonstrate the shared nature of the bus. This is still a limitation if you use some Gadgeteer modules on the Go board. There are some discussions in the forums about this.)

The pins that are different are chip select to let the device on a bus know whether or not it is the device being communicated with.



#33394 Netduino GO Power Question

Posted by ErikN on 11 August 2012 - 12:47 AM in Netduino Go

I remember talking to Arron about this a little while ago. Looking at the circuit it certainly seemed possible by coincidence but it looked like it was not designed that way. When powered "correctly" there seems to be a lot of effort put toward clean power and keeping selfish components from affecting the stability of the power. When supplying power from a module - this is all bypassed. You'd need to be very careful not to supply dirty, reversed or spiky power. Chris popped in to catch the tail end of it and ended the conversation with an abrupt: "Don't do that.*" I suppose if you have a large supply of Go boards and don't mind some waste - go ahead! But if you only have one precious, treat it kindly and power it as designed. *I think this was the direct quote. It's been awhile though.



#27025 Netduino Go Firmware v4.2.0

Posted by ErikN on 12 April 2012 - 06:15 AM in Netduino Go

Here is the Netduino Go firmware.

Version: 4.2.0 (version 4.2.0.0)


Is this what is already flashed on the boards or did they ship with a beta of somesort?



#27333 Netduino Go firmware source for GCC

Posted by ErikN on 16 April 2012 - 02:31 AM in Beta Firmware and Drivers

Awesome job! Can't wait to get my compilers on it!



#33313 Netduino does not work when powered by Mac Mini USB

Posted by ErikN on 09 August 2012 - 12:34 AM in General Discussion

I have been developing my Netduino application on a Windows desktop machine - but my deployment scenario is going to involve powering the board from a Mac Mini USB port (currently a Mac Mini 2012 model).
What I have discovered, is that if I plug my netduino into a Mac Mini USB port, the on-board LED lights up, but stays on - and my program never loads.
If, I plug it into my PC, or a wall-wart USB power supply, the on-board LED lights up for a few seconds, then goes out as my program loads into memory, and everything works.

Why does my Netduino not run correctly when powered by Mac Mini??

Thanks


I noticed a similar issue. All I had to do was tap the reset button and it'd come up just fine. I noticed as soon as my VM running on the Mac Mini was set up to automatically attach the Netduino to the Windows instance, this stopped happening. Before that it was reliable to just reset the board and it'd come straight up.



#24202 My Paranormal Investigation Tool(s) Project

Posted by ErikN on 13 February 2012 - 10:34 PM in Project Showcase

Please give it another shot. I think it was blocking all non USA traffic because of some spam I was getting from China a while back.


Ah yes, the sledgehammer approach.



#24830 My Paranormal Investigation Tool(s) Project

Posted by ErikN on 28 February 2012 - 09:32 PM in Project Showcase

Just wanted to report that I had my first successful test of my project in the field on an investigation of an old tavern Saturday Night.


Congrats!


This was also my first test of the new LiPo battery circuit and the charger and it worked fine.


I looked over your project site but I didn't see anything specific about this. I'm curious - what are you using? Custom build? I just picked up a couple of these from Adafruit and I've just started testing them. So far with default configuration I was able to charge a LiPoly battery and blind myself with a 1W LED on the circuit output from a MacBook Pro USB port. The board says it can do 1A but I believe the default is 500mA.

I didn't run the LED for very long, I just wanted to test the transition from USB pass-through while charging the LiPoly to running from the LiPoly pack.



#26641 Mutitasking help needed

Posted by ErikN on 06 April 2012 - 03:49 PM in Netduino 2 (and Netduino 1)

If your methods are timed correctly and you don't want to adjust your logic, I'd just create a helper function that takes an array of delegates (VoidAction delegate?)
and runs them each in a new thread using a ManualResetEvent and a counter to track when each finish and only mre.Set when they've all completed. This would
make your helper function become a blocking call which starts and tracks the completion of multiple threads at once.

public delegate void VoidAction();
void AwaitCompletionOf(VoidAction[] actions);


For the first timing diagram, your code would be as simple as the pseudo-code below:

loop:
Thread_1(); // This is call to method directly so it blocks
AwaitCompletionOf(new VoidAction[] {Thread_2, Thread_3, Thread_4, Thread_5}); //Executing parallel; group blocks
AwaitCompletionOf(new VoidAction[] {Thread_6, Thread_7}); //Same as previous
Thread_8();

The second timing diagram would require a bit more work to synchronize the 1st and 8th methods while running the middle threads in waiting parallel groups.

For inspiration, you can look at the beta (but works!) version of a ParallelForEach extension I'd written for NETMF awhile back. It was refined with feedback from Corey Kosak here on the Netduino boards.



#26649 Mutitasking help needed

Posted by ErikN on 06 April 2012 - 07:29 PM in Netduino 2 (and Netduino 1)

Some good approaches and advice in that very long thread. As soon as my eyes uncross I could try giving it another pass. Posted Image



#26991 Mutitasking help needed

Posted by ErikN on 11 April 2012 - 11:19 PM in Netduino 2 (and Netduino 1)

I'm so sorry for not responding sooner! My watch on this thread seems to have gotten lost! I guess this explains why perkunas emailed me directly!

This is the code I provided (the helper function is the main bit) and perkunas was able to integrate it and get it to work but he's seeing some strange behavior on some pins when the board is first turned on that he's still trying to diagnose. I thought it might be normal board behavior but it sounds not quite right. He says it stabilizes after 5 seconds or so. Hopefully someone more knowledgeable of the board can help here.

Before I paste the code - the other approaches are pretty much the same and probably lighter weight than this but since perkunas is actually using this at the moment I include it so everyone can be on the same page (so the hardware guys don't blame the software too soon or unjustly!) Again, the AwaitCompletionOf is an adaptation of a function that was heavily inspired by forum member Corey Kosak.

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



namespace Example
{
  public class Program
  {
      public const int SecondMs = 1000;
      public const int MinuteMs = 60 * SecondMs;
      public const int HourMs = 60 * MinuteMs;
      public const int DayMs = 24 * HourMs;
      public const int WeekMs = 7 * DayMs;

      static OutputPort ph = new OutputPort(Pins.GPIO_PIN_D2, true);
      static OutputPort b = new OutputPort(Pins.GPIO_PIN_D3, true);
      static OutputPort a = new OutputPort(Pins.GPIO_PIN_D4, true);
      static OutputPort drain = new OutputPort(Pins.GPIO_PIN_D5, true);
      static OutputPort solenoid = new OutputPort(Pins.GPIO_PIN_D6, true);
      static OutputPort heater = new OutputPort(Pins.GPIO_PIN_D7, true);
      static OutputPort controller = new OutputPort(Pins.GPIO_PIN_D8, true);


      public delegate void VoidAction();

      public static void Main()
      {
          try
          {
              while (true)
              {
                  Method_1();
                  AwaitCompletionOf(new VoidAction[] { Method_2, Method_3, Method_4, Method_5 });
                  AwaitCompletionOf(new VoidAction[] { Method_6, Method_7 });
                  Method_8();
                  Thread.Sleep(10000);
              }
          }
          catch
          {
              //Something has gone wrong; reset to a safe condition
          }
      }

      void RunTheStuff()
      {
      }

      public static void Method_1()
      {
          drain.Write(false);
          Thread.Sleep(16 * MinuteMs);
          drain.Write(true);
      }
      public static void Method_2()
      {
          solenoid.Write(false);
          Thread.Sleep(16 * MinuteMs);
          solenoid.Write(true);
      }
      public static void Method_3()
      {
          a.Write(false);
          Thread.Sleep(11 * MinuteMs + 7 * SecondMs);
          a.Write(true);
      }
      public static void Method_4()
      {
          b.Write(false);
          Thread.Sleep(6 * MinuteMs + 3 * SecondMs);
          b.Write(true);
      }
      public static void Method_5()
      {
          ph.Write(false);
          Thread.Sleep(3 * SecondMs);
          ph.Write(true);
      }
      public static void Method_6()
      {
          while (true)
          {
              controller.Write(false);
              Thread.Sleep(1 * SecondMs);
              controller.Write(true);
              Thread.Sleep(10 * MinuteMs);
          }
      }
      public static void Method_7()
      {
          heater.Write(false);
          for (int i = 0; i < 14; i++)
          {
              solenoid.Write(false);
              Thread.Sleep(20 * SecondMs);
              solenoid.Write(true);
              Thread.Sleep(1 * DayMs);

          }
          heater.Write(false); // added this
      }
      public static void Method_8()
      {
          drain.Write(false);
          Thread.Sleep(16 * MinuteMs);
          solenoid.Write(false);
          Thread.Sleep(16 * MinuteMs);
          Thread.Sleep(30 * MinuteMs);


      }

      public static void AwaitCompletionOf(VoidAction[] actions, int millsecondsTimeout = -1)
      {
          ManualResetEvent mre = new ManualResetEvent(false);
          Thread t = null;
          int total = 0;
          int target = actions.Length;

          for (int i = 0; i < target; i++)
          {
              if (null != t)
                  t.Start();

              int captured = i;

              t = new Thread(() =>
              {
                  try
                  {
                      actions[captured]();
                  }
                  finally
                  {
                      if (Interlocked.Increment(ref total) == target)
                          mre.Set();
                  }
              });
          }

          if (null != t)
          {
              t.Start();
              mre.WaitOne(millsecondsTimeout, false);
          }
      }
  }
}



#26640 Mutitasking help needed

Posted by ErikN on 06 April 2012 - 03:19 PM in Netduino 2 (and Netduino 1)

I'm a little confused on what you're trying to accomplish (I don't know the other thread to which CW2 referred).
Looking at your post, this is what I understand you're asking for - please correct me if this is wrong.


[==T1==>]
        [==T2==>]
        [==T3=>]|
        [==T4=>]|
        [=T5=>] V
                [==T6=>]
                [========T7=======>]
                                   [====T8====>]

Or is this more accurate?


[==================T1==================>]
 [==T2==>]                              |
 [==T3=>]|                              |
 [==T4=>]|                              |
 [=T5=>] V                              | 
         [==T6=>]                       |
         [========T7=======>]           V
                            [====T8====>]




#34154 More GoBus news: through-hole GoPort IDC Headers

Posted by ErikN on 24 August 2012 - 04:18 PM in Netduino Go

Awesome! Can't wait for them to be stocked! Posted Image



#36497 More GoBus news: through-hole GoPort IDC Headers

Posted by ErikN on 03 October 2012 - 07:32 PM in Netduino Go

I'm glad neslekkim revived this post. I completely missed this entire post. Very excited to read this whole thread.


Same here. Thanks for the bump!




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.