- Netduino Forums
- → ErikN's Content
ErikN's Content
There have been 89 items by ErikN (Search limited from 06-May 23)
#26937 Arduino body movement sensor does not work
Posted by ErikN on 11 April 2012 - 02:08 PM in General Discussion
#26938 Individual assemblies sizes
Posted by ErikN on 11 April 2012 - 02:12 PM in Netduino 2 (and Netduino 1)
#26985 Introducing Netduino Go
Posted by ErikN on 11 April 2012 - 10:14 PM in Netduino Go
Hi x893,
We used RVCT (ARM RVDS 4.1) to compile the Netduino Go firmware.
CW2 did quite a bit of work to get it to compile under GCC (using Yagarto...maybe CodeSourcery) as well. This is not tested, but we do want to make sure that everything compiles under the free GCC compiler as well.
Chris
THANK YOU! I tried compiling 4.1 from the NETMF sources but it was a jumbled mess and I couldn't figure it out. After a couple hours I was like: "I has a sad" and gave up. But I still strongly desire to tinker in the native layer to add in some things I think would be useful for me and test them out. I don't like the idea of asking others to make the change to see what happens and I won't blindly send a pull request or merge source that I can't test myself!
Chris - You're my hero for inspiring such awesome people.
CW2 - I will grant you one wish. Within my power to grant. And if it's not too troublesome or very illegal. Unless I'm incapable of making it work again.
#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); } } } }
#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?
#27094 Introducing Netduino Go
Posted by ErikN on 12 April 2012 - 07:26 PM in Netduino Go
The firmware source patch for GCC-based toolchains will be released soon. Please stay tuned.
Tease.
#27158 Bay Area Maker Faire Meetup Planning
Posted by ErikN on 13 April 2012 - 03:39 PM in General Discussion
#27161 Bay Area Maker Faire Meetup Planning
Posted by ErikN on 13 April 2012 - 04:11 PM in General Discussion
Artist? I was thinking about just the logo on the front, maybe on the back, pretty simple
You should consider an easy-to-read/remember shortlink or QR code for those too shy to ask about it. Make it easy for them to see or secretly scan to keep it on record to look up later!
#27333 Netduino Go firmware source for GCC
Posted by ErikN on 16 April 2012 - 02:31 AM in Beta Firmware and Drivers
#27394 Free webcast: Getting Started with Netduino + Netduino Go!
Posted by ErikN on 16 April 2012 - 07:15 PM in General Discussion
#27399 .NET Micro Framework 4.3 Roadmap
Posted by ErikN on 16 April 2012 - 07:44 PM in General Discussion
#27502 Two Fading LED's
Posted by ErikN on 17 April 2012 - 10:55 PM in Netduino 2 (and Netduino 1)
#27558 Two Fading LED's
Posted by ErikN on 18 April 2012 - 04:11 PM in Netduino 2 (and Netduino 1)
#27561 Two Fading LED's
Posted by ErikN on 18 April 2012 - 04:25 PM in Netduino 2 (and Netduino 1)
#27734 Netduino Go! RGB Umbrella
Posted by ErikN on 20 April 2012 - 06:14 PM in Project Showcase
#27749 BlueSMiRF Silver (Bluetooth)
Posted by ErikN on 20 April 2012 - 09:03 PM in Netduino Plus 2 (and Netduino Plus 1)
"Baud Rate select - used to configure 9600 or software selected (default=115K ) baudrate. If the switch is
OFF, the stored baudrate setting will be used. When the switch is in the ON position, the baudrate will be set
to 9600 regardless of the software setting."
Can you check this and verify you're using the proper settings? I'd recommend turning this switch on and communicating via 9600 to ensure your code is working and then try again at 115,200 and ensure everything is still working. It might be that 115,200 is just too fast (seems unlikely).
#27761 Netduino Go! RGB Umbrella
Posted by ErikN on 20 April 2012 - 09:58 PM in Project Showcase
#27775 Google+ Plus Hangout Tonight
Posted by ErikN on 21 April 2012 - 12:36 AM in General Discussion
#27857 Asynchronous Delegates
Posted by ErikN on 21 April 2012 - 10:10 PM in General Discussion
#27946 TRIAC's for switching 24VAC?
Posted by ErikN on 23 April 2012 - 02:31 PM in General Discussion
I've never looked at the schematics to see how this differs from what I know about SSRs so this is presented as informational and entertainment purposes only. If you learn something it's your own fault.
Enjoy!
#28359 Bay Area Maker Faire Meetup Planning
Posted by ErikN on 30 April 2012 - 07:43 PM in General Discussion
But big chance I will be at maker faire NY in September!
Sweet! Or as they say in your language, dit is echt het meest opwindende nieuws!
#28721 DIY Go Cables
Posted by ErikN on 09 May 2012 - 03:39 PM in Netduino Go
I found the connectors but even in volume they were over $1 each, and you obviously need 2 of them, making them more pricey than buying assembled cables for the most part.
But the pre-assembled are in specific lengths. The OP isn't suggesting this would be cheaper but rather would lead to more custom lengths and would make use of the currently wasted ribbon cables.
#32750 Family Photo
Posted by ErikN on 27 July 2012 - 04:21 AM in Netduino Go
#33140 Mars landing tonight -- meetup online and in Times Square
Posted by ErikN on 05 August 2012 - 08:40 PM in General Discussion
#33143 Mars landing tonight -- meetup online and in Times Square
Posted by ErikN on 05 August 2012 - 11:49 PM in General Discussion
- Netduino Forums
- → ErikN's Content
- Privacy Policy