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.

EddieGarmon's Content

There have been 24 items by EddieGarmon (Search limited from 17-April 23)


By content type

See this member's

Sort by                Order  

#64842 Analog Outputs - Outputing varying voltages between 0v-3.3v

Posted by EddieGarmon on 02 February 2016 - 11:25 PM in General Discussion

Add a simple RC circuit or ladder to the output of a PWM signal. The RC will level the voltage and will set the parameters for the quickness it responds to input change.




#64034 Introducing Llilum, the native-compiled (NETMF) proof of concept

Posted by EddieGarmon on 04 September 2015 - 01:17 PM in General Discussion

If you want a working implementation of Tasks today for MF 4.2 and 4.3 I have them up on NuGet here:

https://www.nuget.or...ober.Threading/




#63432 Battery power to run stand-alone

Posted by EddieGarmon on 09 July 2015 - 02:41 AM in Netduino 3

Amperage rating of the DC source will need to be at or above the total needs of your system, so yes, unfortunately, it does depend.




#62932 Fastening to a plexi glass base

Posted by EddieGarmon on 27 May 2015 - 02:00 PM in Netduino 3

Tall plastic tube is a nylon spacer .5 in long, .188 in outer diameter, 0.117 in inner diameter, bought from a local True Value Hardware store.

 

I also have 3 @ 0.25 in OD, 0.115 ID underneath.

 

I believe the hole position is an artifact of arduino design before I2C had independent pins near there.

Attached Thumbnails

  • standoffs.jpg



#62902 Fastening to a plexi glass base

Posted by EddieGarmon on 26 May 2015 - 06:19 PM in Netduino 3

for play, this is all you need...

Attached Thumbnails

  • WP_20150526_001 small.jpg



#62742 Recommended HTTP API for the future?

Posted by EddieGarmon on 19 May 2015 - 01:23 PM in Netduino 3

client or server?




#62609 Curiosity asbout a "mega" version

Posted by EddieGarmon on 11 May 2015 - 04:55 PM in General Discussion

optos are used to keep low and high voltage signals apart, but allow data transmission between them. they use a led coupled with a photo transistor and the "light" is the wire between them. you can build your own but they come packaged on die in 1, 2, 4 and 8+ configurations. and you do not want to mix 3.3v with 12v and 24v if you do not have to.




#62586 Curiosity asbout a "mega" version

Posted by EddieGarmon on 10 May 2015 - 08:44 PM in General Discussion

as for CAN, I currently use a slightly modified Seeed shield, works well...




#62585 Curiosity asbout a "mega" version

Posted by EddieGarmon on 10 May 2015 - 08:42 PM in General Discussion

for 12 and 24 volt applications, learn to use opto-isolators, they are your friend.




#62408 Introducing Netduino 3 Wi-Fi

Posted by EddieGarmon on 03 May 2015 - 02:35 AM in Netduino 3

current status:

the front seat's broken and the axle's draggin'

 

and yes, that and rockets.




#62406 Introducing Netduino 3 Wi-Fi

Posted by EddieGarmon on 03 May 2015 - 02:05 AM in Netduino 3

a small box and some hardware...

 

http://1drv.ms/1bPA8kq

 

row of 3 L2R: Net2+, Net3wifi, CerbNet

on chassis: Net2+




#62351 Introducing Netduino 3 Wi-Fi

Posted by EddieGarmon on 01 May 2015 - 05:55 PM in Netduino 3

amazon is fast, hardware in hand...




#62286 Scott Hanselman just flashed a Netduino Wifi at BUILD

Posted by EddieGarmon on 29 April 2015 - 07:00 PM in Netduino 3

just ordered mine too. excited...




#62270 InterruptEdgeLevelHigh

Posted by EddieGarmon on 28 April 2015 - 01:25 PM in Netduino Plus 2 (and Netduino Plus 1)

kalio20, good try, but that will not work.

 

InteruptMode.InterupEdgeLevelHigh is not supported in the firmware currently.

 

To fake what you want, use InteruptEdgeHigh, and then manually disable and re-enable the interrupt in your handler.




#62220 Multithreading

Posted by EddieGarmon on 22 April 2015 - 10:41 AM in Netduino Plus 2 (and Netduino Plus 1)

Ideally you limit creation of items you need and reuse where possible, especially when long lived (such as threads usually are). How long does your mode take to execute?

 

I have recently published a Task implementation to NuGet that supports NETMF 4.2 and 4.3 at:

http://www.nuget.org...ober.Threading/

 

Sounds like you are trying to implement a state machine? If so, other approaches would have better performance.




#61948 Controlling Multiple I2C devices

Posted by EddieGarmon on 25 March 2015 - 03:32 PM in Netduino Plus 2 (and Netduino Plus 1)

I have done the same, but went as far as a true interface for a bus and another for a device. now I can plug in a mock bus for driver testing, and a spot bus for working on a netduino.

 

https://github.com/E...er/Hardware/I2C




#61849 uScoober - the filament for NETMF

Posted by EddieGarmon on 12 March 2015 - 12:37 AM in Project Showcase

The conference is supposed to be recorded and put online, so when that happens, I will copy the links here.




#61846 uScoober - the filament for NETMF

Posted by EddieGarmon on 11 March 2015 - 08:14 PM in Project Showcase

I will be presenting at .NET/FRINGE/ next month on bringing Task based APIs to NETMF.

 

http://dotnetfringe.org/

 

April 12-14 in Portland, OR

 

Hope to see you there.




#61793 Netduino Outlaw Derby - in progress

Posted by EddieGarmon on 06 March 2015 - 03:37 PM in Project Showcase

The code is now up on GitHub:

 

https://github.com/EddieGarmon/uDerby

 

And the libraries are at

 

https://github.com/E...Garmon/uScoober




#61792 uScoober - the filament for NETMF

Posted by EddieGarmon on 06 March 2015 - 03:34 PM in Project Showcase

I have open sourced my NETMF core utility libraries, build tools, and test framework.

 

https://github.com/E...Garmon/uScoober

 

Way too many features to list here but:

- core interfaces that are testable

- an implementation of Tasks (think TPL)

- an xunit inspired test framework; with native, emulator, and build test runners

- features and drivers delivered as source

- packages on nuget.org

 

 




#61760 Netduino Outlaw Derby - in progress

Posted by EddieGarmon on 02 March 2015 - 01:15 PM in Project Showcase

And here it is in action: http://1drv.ms/1BCwT9Z




#61668 Netduino Outlaw Derby - in progress

Posted by EddieGarmon on 20 February 2015 - 03:17 AM in Project Showcase

And here is the code that went live... First production use of NETMF Tasks. 

using System;
using System.Threading;
using Microsoft.SPOT;
using uScoober.Extensions;
using uScoober.Hardware;
using uScoober.Hardware.Boards;
using uScoober.Hardware.Light;
using uScoober.Hardware.Motors;
using uScoober.IO;
using uScoober.IO.Native;
using uScoober.Threading;
using SL = SecretLabs.NETMF.Hardware.NetduinoPlus;

namespace Outlaw.Derby
{
    public class Program
    {
        public static void Main() {
            //TaskScheduler.UnobservedExceptionHandler += exception => Debug.Print(exception.ToString());

            // warmup task engine
            Task.Run(() => { })
                .Wait();

            //wow, an IoT Pinewood Derby car? add some sensors...
            var car = new Car();
            car.Start();
        }
    }

    public class Car
    {
        private readonly Task _lightsManager;
        private readonly DigitalInput _modeSwitch;
        private readonly NetduinoPlus2 _netduino;
        private readonly BrushlessElectronicSpeedController _speedController;
        private readonly DigitalInput _triggerLock;
        private CancellationSource _cancelRace;
        private Modes _mode;
        private int _wantedPower;

        public Car() {
            _netduino = new NetduinoPlus2();
            _speedController = new BrushlessElectronicSpeedController(_netduino.PwmOut.D5);

            //initialize input listeners
            _modeSwitch = new DigitalInput(SL.Pins.GPIO_PIN_D1, "mode switch", ResistorMode.PullUp, InterruptMode.InterruptEdgeBoth, 50);
            _modeSwitch.InvertReading = true;
            _modeSwitch.OnInterupt += (source, state, time) => {
                                          _mode = _modeSwitch.Read() ? Modes.Staging : Modes.LightShow;
                                          _speedController.Stop();
                                      };

            _triggerLock = new DigitalInput(SL.Pins.GPIO_PIN_D2, "trigger-lock/e-stop", ResistorMode.PullUp, InterruptMode.InterruptEdgeBoth, 100);
            _triggerLock.InvertReading = true;
            _triggerLock.OnInterupt += (source, state, time) => {
                                           //fire on button down, coud use InterruptMode.InterruptEdgeLow
                                           if (!_triggerLock.Read()) {
                                               return;
                                           }

                                           switch (_mode) {
                                               case Modes.LightShow:
                                               case Modes.Celebrate:
                                               case Modes.Arming:
                                                   return;

                                               case Modes.Staging:
                                                   if (!StartingPinFound()) {
                                                       return;
                                                   }
                                                   _mode = Modes.Arming;
                                                   Thread.Sleep(1500);
                                                   if (!StartingPinFound()) {
                                                       _mode = Modes.Staging;
                                                       return;
                                                   }
                                                   SnapshotWantedPower();
                                                   _cancelRace = new CancellationSource();
                                                   Task.Run(token => {
                                                                while (StartingPinFound()) {
                                                                    _mode = Modes.Armed;
                                                                    //wait for the pin to drop, or cancellation
                                                                    token.ThrowIfCancellationRequested();
                                                                }
                                                                //Go Baby Go: fire all engines!
                                                                _mode = Modes.Race;
                                                                _speedController.SetPower(_wantedPower);
                                                                // todo: how long should we run?
                                                                int counter = 0;
                                                                while (counter < 2500) {
                                                                    if (token.IsCancellationRequested) {
                                                                        _speedController.Stop();
                                                                        token.ThrowIfCancellationRequested();
                                                                    }
                                                                    counter++;
                                                                    Thread.Sleep(1);
                                                                }
                                                            },
                                                            _cancelRace)
                                                       .ContinueWith(previous => {
                                                                         _speedController.Stop();
                                                                         _mode = (previous.IsCanceled) ? Modes.LightShow : Modes.Celebrate;
                                                                         _cancelRace = null;
                                                                     });
                                                   return;

                                               case Modes.Armed:
                                               case Modes.Race:
                                                   _speedController.Stop();
                                                   _cancelRace.Cancel();
                                                   return;

                                               default:
                                                   throw new ArgumentOutOfRangeException();
                                           }
                                       };

            _lightsManager = Task.New(() => {
                                          var leftFrontLed = new DigitalLed(new DigitalOutput(SL.Pins.GPIO_PIN_D13, false, "Left Front"));
                                          var rightFrontLed = new DigitalLed(new DigitalOutput(SL.Pins.GPIO_PIN_D12, false, "Right Front"));
                                          var leftRearLed = new DigitalLed(new DigitalOutput(SL.Pins.GPIO_PIN_D11, false, "Left Rear"));
                                          var rightRearLed = new DigitalLed(new DigitalOutput(SL.Pins.GPIO_PIN_D10, false, "Right Rear"));
                                          var random = new Random();
                                          int counter1 = 0;

                                          while (true) {
                                              bool flag;
                                              switch (_mode) {
                                                  case Modes.LightShow:
                                                      counter1 = (counter1 + 1) % 50;
                                                      if (counter1 == 1 || counter1 == 26) {
                                                          leftFrontLed.IsOn = random.NextBool();
                                                          leftRearLed.IsOn = random.NextBool();
                                                          rightFrontLed.IsOn = random.NextBool();
                                                          rightRearLed.IsOn = random.NextBool();
                                                      }
                                                      _netduino.OnboardLed.TurnOn(counter1 / 50.0);
                                                      break;
                                                  case Modes.Staging:
                                                      // blink left and right, front and back together
                                                      counter1 = (counter1 + 1) % 50;
                                                      flag = counter1 < 25;
                                                      leftFrontLed.IsOn = flag;
                                                      leftRearLed.IsOn = flag;
                                                      rightFrontLed.IsOn = !flag;
                                                      rightRearLed.IsOn = !flag;
                                                      _netduino.OnboardLed.IsOn = counter1 < 5;
                                                      break;
                                                  case Modes.Arming:
                                                      counter1 = (counter1 + 1) % 10;
                                                      flag = counter1 < 5;
                                                      leftFrontLed.IsOn = flag;
                                                      leftRearLed.IsOn = flag;
                                                      rightFrontLed.IsOn = flag;
                                                      rightRearLed.IsOn = flag;
                                                      _netduino.OnboardLed.IsOn = flag;
                                                      break;
                                                  case Modes.Armed:
                                                      // blink left and right front, rears on
                                                      counter1 = (counter1 + 1) % 50;
                                                      flag = counter1 < 25;
                                                      leftFrontLed.IsOn = flag;
                                                      leftRearLed.IsOn = true;
                                                      rightFrontLed.IsOn = !flag;
                                                      rightRearLed.IsOn = true;
                                                      _netduino.OnboardLed.TurnOn();
                                                      break;
                                                  case Modes.Race:
                                                      // fronts on, rears off
                                                      leftFrontLed.IsOn = true;
                                                      leftRearLed.IsOn = false;
                                                      rightFrontLed.IsOn = true;
                                                      rightRearLed.IsOn = false;
                                                      _netduino.OnboardLed.TurnOff();
                                                      break;
                                                  case Modes.Celebrate:
                                                      // fronts fast random, rears blink together
                                                      counter1 = (counter1 + 1) % 50;
                                                      flag = counter1 < 25;
                                                      if (counter1 == 1 || counter1 == 26) {
                                                          leftFrontLed.IsOn = random.NextBool();
                                                          rightFrontLed.IsOn = random.NextBool();
                                                      }
                                                      leftRearLed.IsOn = flag;
                                                      rightRearLed.IsOn = flag;
                                                      _netduino.OnboardLed.TurnOn((50 - counter1) / 50.0);
                                                      break;
                                                  default:
                                                      throw new ArgumentOutOfRangeException();
                                              }
                                              Thread.Sleep(10);
                                          }
                                      });
        }

        public void Start() {
            _netduino.OnboardLed.TurnOn();
            _speedController.Arm();
            _mode = Modes.LightShow;
            _modeSwitch.InteruptEnabled = true;
            _triggerLock.InteruptEnabled = true;
            _lightsManager.Start();
        }

        private void SnapshotWantedPower() {
            // 2 part scale
            // 0v to 1.6v => 0% to 50%
            // 1.6v to 2.15v => 50% to 100%

            var reading = _netduino.AnalogIn[2].Read();
            if (reading < 1.6) {
                _wantedPower = (int)((reading * 50) / 1.6);
            }
            else {
                _wantedPower = 50 + (int)(((reading - 1.6) * 50) / 0.55);
            }

            Debug.Print("Wanted Power:" + _wantedPower);
        }

        private bool StartingPinFound() {
            double light = _netduino.AnalogIn.A0.Read();
            Debug.Print("Start Light:" + light);
            return light >= 1.6;
        }

        private enum Modes
        {
            LightShow,
            Staging,
            Arming,
            Armed,
            Race,
            Celebrate
        }
    }
}




#61667 Netduino Outlaw Derby - in progress

Posted by EddieGarmon on 20 February 2015 - 03:13 AM in Project Showcase

Ran the car tonight. 1.6 seconds on a 35 foot track, ~288 mph scaled.

The best was when I ran it up the track and it took flight. Pure chaos in the room.

This was done with only 7.4V potential to the motor.

Tomorrow I going to make final speed runs with 14.8V potential.

Then see how far it can fly...

 

@David, I'm sure it could, but it would be badly shaken or all spilt from the journey




#61632 Netduino Outlaw Derby - in progress

Posted by EddieGarmon on 17 February 2015 - 12:18 AM in Project Showcase

My outlaw pinewood derby car for this year:

 

Netduino Plus 2 controller, 25 amp ESC, multiple batteries, ducted fan, solder, and code.

 

Video of the build: http://1drv.ms/1EmgKUE

 

This runs on a new framework which includes an implementation of TPL for NETMF. I intend to release the framework on GitHub soon.

 

//Eddie





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.