- Netduino Forums
- → ErikN's Content
ErikN's Content
There have been 89 items by ErikN (Search limited from 11-May 23)
#26429 Redacted 00101100
Posted by ErikN on 04 April 2012 - 05:14 PM in General Discussion
#26296 Redacted 00101100
Posted by ErikN on 03 April 2012 - 03:54 AM in General Discussion
#38410 Processing Speed
Posted by ErikN on 03 November 2012 - 06:13 AM in Netduino Go
#37130 Problem TCP Recieve Shows in a Textbox
Posted by ErikN on 13 October 2012 - 05:51 PM in Visual Basic Support
#37096 Problem TCP Recieve Shows in a Textbox
Posted by ErikN on 12 October 2012 - 07:39 PM in Visual Basic Support
#37193 Problem TCP Recieve Shows in a Textbox
Posted by ErikN on 14 October 2012 - 10:49 PM in Visual Basic Support
#38435 Power Outage in New York
Posted by ErikN on 03 November 2012 - 04:11 PM in General Discussion
#38268 Power Outage in New York
Posted by ErikN on 30 October 2012 - 11:55 PM in General Discussion
#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
#27734 Netduino Go! RGB Umbrella
Posted by ErikN on 20 April 2012 - 06:14 PM in Project Showcase
#27761 Netduino Go! RGB Umbrella
Posted by ErikN on 20 April 2012 - 09:58 PM in Project Showcase
#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
#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
#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)
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)
#26991 Mutitasking help needed
Posted by ErikN on 11 April 2012 - 11:19 PM in Netduino 2 (and Netduino 1)
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)
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
#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!
- Netduino Forums
- → ErikN's Content
- Privacy Policy