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.

Brandon G's Content

There have been 92 items by Brandon G (Search limited from 25-April 23)


By content type

See this member's


Sort by                Order  

#8779 Reference NETMF libraries in .NET

Posted by Brandon G on 31 January 2011 - 10:18 PM in General Discussion

if you could dig up when in front of computer cause thus far my search has revealed nothing



#8777 Reference NETMF libraries in .NET

Posted by Brandon G on 31 January 2011 - 10:13 PM in General Discussion

I actually have got Nunit to work on some simple tests but maybe thats because the classes were so simple



#8775 Reference NETMF libraries in .NET

Posted by Brandon G on 31 January 2011 - 09:53 PM in General Discussion

I have a windows app that i want to be able to call some of the methods of netmf assemblies, is this at all possible? is there a way for an emulator to take over to be able to load those objects



#8598 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 28 January 2011 - 04:06 AM in Project Showcase

lol, guess i responded too quickly, thank you for your suggestions



#8597 Coding style discussion

Posted by Brandon G on 28 January 2011 - 04:04 AM in General Discussion

Mark, Thank you for your comments, this forum has truly tested my ability to hold my tongue and be professional. I will try to make a point of not posting questions that expose you to my "amateur / ignorant" coding techniques shared by ms mvps and the ms clr team. Great community we have here.



#8581 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 27 January 2011 - 07:22 PM in Project Showcase

Whoa a month, i guess i need to stop procrastinating......

heres my ideas hardware wise, would like some opinions, you mentioned using a better BEC, so I have taken it off the list open for your suggestions, keeping in mind i am trying to be very modular is the reason for the component shield

Motor	6	 $6.00 	 $36.00 	http://www.hobbyking.com/hobbycity/store/uh_viewItem.asp?idProduct=5354&aff=104834
ESC	6	 $9.23 	 $55.38 	http://www.hobbyking.com/hobbycity/store/uh_viewItem.asp?idProduct=6458&Product_Name=Hobbyking_SS_Series_25-30A_ESC_%28card_programmable%29&aff=104834
Props	8	 $4.00 	 $32.00 	https://www.mikrocontroller.com/index.php?main_page=product_info&cPath=75&products_id=256&zenid=43fb24fa5fbee9bca99cea5ee6462e48
Battery	3	 $19.00 	 $57.00 	http://hobbycity.com/hobbyking/store/uh_viewItem.asp?idProduct=7634
Battery Charger	1	 $25.00 	 $25.00 	http://www.hobbyking.com/hobbyking/store/uh_viewitem.asp?idproduct=2055 
Frame	1	 $90.00 	 $90.00 	http://quadframe.com/html/quad002.html
RC Transmitter	1	 $60.00 	 $60.00 	http://hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=8992
ITG3200/ADXL345	1	 $65.00 	 $65.00 	http://www.sparkfun.com/products/10321
Component Shield	1	 $22.00 	 $22.00 	http://www.robotshop.ca/ghi-component-shield-v2.html
JST Sensor Cable	20	 $1.76 	 $35.20 	http://www.robotshop.ca/inex-jst3aa-sensor-cable.html



#8575 Coding style discussion

Posted by Brandon G on 27 January 2011 - 06:54 PM in General Discussion

Resharper is my best practises post processor :)



#8567 Coding style discussion

Posted by Brandon G on 27 January 2011 - 05:22 PM in General Discussion

yea its counterintuitive I is used for Interface and I want to know that straight up at the beginning if i'm dealing with an interface. I think at the end of there are slight variations in coding style, i like to know whether i'm private or public or a const or a Public Member and interface a factory a handler a delegate an event, just by looking at the variable name, i used to be even more explicit than this but the big guys jumped all over me. Its just a readability thing for me and as long as all parties agree at beginning of project you're solid. And Chris / Luke, never do i burn a bridge, but cut me some slack, we're all just trying to do neat stuff and have fun or work, how we post is not a big deal, if i get excited about something sometimes i'll throw a few posts down in a row, its an iterative process and sometimes a stream of thought happens, there's no egos or etiquette, its just code. We are all a community and need each others help at certain points in the process, so I would hope to be able to lean on anyone that has more experience than I especially in this specific project, hopefully one day you can lean on me for parts of your projects.



#8565 Coding style discussion

Posted by Brandon G on 27 January 2011 - 05:04 PM in General Discussion

•Do not use Hungarian notation •Do not use a prefix for member variables (_, m_, s_, etc.). If you want to distinguish between local and member variables you should use “this.” in C# and “Me.” in VB.NET. •Do use camelCasing for member variables •Do use camelCasing for parameters •Do use camelCasing for local variables •Do use PascalCasing for function, property, event, and class names •Do prefix interfaces names with “I” •Do not prefix enums, classes, or delegates with any letter Me and the rest of the community disagree with this, i understand why its stated as it is, but i disagree. using this. is ugly and redundant (resharper agrees) Its just a style, i've worked with a few of the top guys over the years and we all use this style, at beginning of projects we agree on a naming convention and this is the one we have consistently agreed upon



#8560 Coding style discussion

Posted by Brandon G on 27 January 2011 - 04:21 PM in General Discussion

lol on the underscores, there's alot of things i do that arent in ms' best practises. I'd say 80% of the community uses the same naming practises as above. Going to research the IL to see your other suggestion



#8535 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 27 January 2011 - 08:10 AM in Project Showcase

Thanks Mark that makes sense, we need to just concentrate on throttle and throttle alone.
Chris thank you for the forum etiquette reminder. The posts were fast given we we had discovered the algo at the exact same time i replied and implemented it in code, i've attached our algo. i think you might be on to something as far as making it a scaling variable that can change as the flight conditions change.
using System;
namespace Quad.Net.Commons.Utilities
{
    public class Scale
    {
        private readonly double[] _coefficients;
        private readonly double _offset;

        public Scale(double offset, params double[] coefficients)
        {
            _coefficients = coefficients;
            _offset = offset;
        }

        public double Calculate(double value)
        {
            double output = 0;

            for (int i = 0; i < _coefficients.Length; i++)
            {
                output += Math.Pow(value + _offset, i) * _coefficients[_coefficients.Length - i - 1];
            }
            return output;
        }
    }
}
namespace Quad.Net.Tests
{
    [TestFixture]
    public class ScaleTests
    {
        [Test]
        public void TestQuadratics()
        {
            Scale scale = new Scale(-1500, 0.0000008, 0, 0, 0);
            Assert.AreEqual(scale.Calculate(1000),-100);
        }
    }
}



#8527 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 27 January 2011 - 06:55 AM in Project Showcase

understand it now, we just compensated in code rather than on tx, that will allow any tx to connect and we should be able to calibrate for it



#8525 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 27 January 2011 - 06:49 AM in Project Showcase

Chris, what do you mean by dual rates and expo on TX, we are trying to compensate for some odd things in tx right now, is there a concept we're missing



#8524 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 27 January 2011 - 06:47 AM in Project Showcase

we think its tx, everything else looks good in code now we just need to cool the rx down, chris take a look at the scale PID and RX, we're cleaning it up now



#8522 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 27 January 2011 - 06:42 AM in Project Showcase

well we're dealing with some hardware issues but have just put in an rx scale to tone it down, basically a parabola on the stick control



#8399 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 25 January 2011 - 03:57 PM in Project Showcase

i thought we were a bit more stable, we still have some work to do then



#8364 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 25 January 2011 - 06:22 AM in Project Showcase

im putting in my order for hardware tomorrow



#8362 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 25 January 2011 - 06:21 AM in Project Showcase

youtube wasnt taking uploads and Luke went to bed, he says he has a stable hover take a look at source its a pretty simple control loop right now but it works



#8360 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 25 January 2011 - 06:12 AM in Project Showcase

Day 2 of hardware testing with new code (in total 2 weeks old) on NETMF, IT HOVERS! Video tomorrow!



#8266 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 24 January 2011 - 08:31 AM in Project Showcase

I also think there is a reason that the original thread is in the top 5 most viewed threads in netduino forum, other people want to see it too



#8262 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 24 January 2011 - 08:00 AM in Project Showcase

Chris, as always your optimism is fantastic. Part of the reason for this project is that i want to understand the concepts, so for me, this is a bit of exploration on the way in which these work (not just the quad but boards and simple EE work). At the end of the day if it doesnt work, i can convert that code to native, but as it stands this is the easiest way for me to define the domain. I honestly appreciate your input and experience with three quads, if it fails, it fails, if it works, you owe me a beer and one of your tricopters for me to pull the guts out of and put my .net microcontroller in and experiment with a tri. I was really hoping to use your experience in this project but i can see it will just be naysaying, so I will continue without.



#8257 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 24 January 2011 - 07:14 AM in Project Showcase

source updated, gc issue resolved as well as redundant update calls, precision is fixed as well as PID using windup guard was not properly implemented, if you can implement radio u should be solid, its the exact same code now



#8256 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 24 January 2011 - 06:34 AM in Project Showcase

https://code.google.com/p/quadnet/ First stab at it, dont mind the pun



#8253 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 24 January 2011 - 06:19 AM in Project Showcase

Yea when i implemented your code i realzied I did that in my implementation, it can be remedied with a quick change to the control loop by calling the old update method explicitly and an alter of the GetReading() method not to call the update. I did a very quick and dirty with your implementation just as show of the style, the returning new AircraftPrinciplaAxes(...) each time is not efficient and can be remedied quick, but i didnt go into specifics there. If you make the change to the update and the return objects of AircraftPrinciplaAxes being held in memory and updating constantly GC will be exacctly what it s was in your old implementation



#8251 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 24 January 2011 - 05:55 AM in Project Showcase

basically you read from one 3 axis gyro or 3 one axis gyro and from a 4 channel reciever and four escs which will be controlled via PWM

below is the simple data used by the reciever and gyro(s)
namespace Quad.Net.Avionics
{
    public class AircraftPrincipalAxes
    {
        /// <summary>
        /// http://en.wikipedia.org/wiki/Aircraft_principal_axes
        /// </summary>
        private int _pitchAngle;
        private int _rollAngle;
        private int _yawAngle;

        public AircraftPrincipalAxes(int pitchAngle, int rollAngle, int yawAngle)
        {
            _pitchAngle = pitchAngle;
            _rollAngle = rollAngle;
            _yawAngle = yawAngle;
        }

        public int PitchAngle
        {
            get { return _pitchAngle; }
        }

        public int RollAngle
        {
            get { return _rollAngle; }
        }

        public int YawAngle
        {
            get { return _yawAngle; }
        }

    }
}

using Quad.Net.Avionics;

namespace Quad.Net.Hardware.Radio
{
    public interface IRadio
    {
        int Throttle { get; }
        AircraftPrincipalAxes GetAxes();
    }
}

using Quad.Net.Avionics;

namespace Quad.Net.Hardware.Gyro
{
    public interface IGyro
    {
        AircraftPrincipalAxes GetReading();
    }
}


these classes would be tied to the events coming off those 6 or 8(gyro implementation specific) pieces of hardware and updating their values within the control loop

you beat me to it Chris, thanks.

As chris said there are a bunch of IMU's that cacn calculate speed, angle acceleration, but the simnplest is to start with a 3 axis gyro and then the aim is to get more complicated later, eventually implementing 5-9 degrees of freedom




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.