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 08-June 23)


By content type

See this member's


Sort by                Order  

#8237 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 24 January 2011 - 03:04 AM in Project Showcase

I have updated and made a very quick implementation of the hardware you have, there may be a few bugs in there but not bad for 10 mins work, your startup project is Quad.Net.FlightController.Implementations.FeziQuad



#8867 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 02 February 2011 - 05:55 AM in Project Showcase

all of them have great reviews, i may be following your lead here. frame wise i am still uncertain i might be going full on here and get one of these guys http://www.maximus-r...fr/maxicopters/



#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



#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



#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



#7960 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 19 January 2011 - 11:42 PM in Project Showcase

http://www.engadget....nType=wl-gadget



#8234 Quad.Net Quadrocopter for .NETMF

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

Yes i pm'ed you the credentials, let me give you your own Harness for your implementation will call it Quad.Net.FeziQuad.Implementation, dont think it'll fly right off bat there's a few things that might still need to be done, you've used some fairly specific esc implemntations and mine use some assumptions that i dont know yet, but not much will PM once i've committed with changes. Chris at this point i'm not sure the hz range i've seen has varied between 250 and 1000 level i've seen is, once i get some hardware in i can be more specific, I'll defer to Chris and Luke on this one



#7959 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 19 January 2011 - 11:40 PM in Project Showcase

that video when posted on engadget is what got me really interested. there's some guys at MIT doing some cool stuff too. The one i found a lil crazy was the one that had the kinect hardware attached for object detection, which i think can be done alot simpler with less weight but still a neat concept



#9009 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 04 February 2011 - 08:52 PM in Project Showcase

Thanks Zerov, do you want commit authority on the source? I've looke at your stuff as well, i think there's alot we can do to help one another, like your circular byte collection code.



#9547 Runtime Native Code Interop

Posted by Brandon G on 14 February 2011 - 09:04 PM in General Discussion

Chris,
Thank you for this. I think this will help a great deal in the cases where near realtime is necessary. I know this requires alot of work to integrate and glad your team are doing it. I would really hope that the NETMF team will take you and GHI's lead as far as providing interops and push it into NETMF. I love managed code and will always write in it when i can, even when knowing i am sacrificing speed for elegance, but given my recent project DotCopter.NET there is no way it can all be done in managed. So in an appeal to the NETMF team, to avoid further fragmentation, they need to pull this into the framework for the cases where its a last resort.

Again, thank you for your efforts Chris.
Brandon



#10645 Quadcopter Early Flight

Posted by Brandon G on 07 March 2011 - 06:53 PM in Project Showcase

great job JBW, PM me when you get a chance



#8951 Anybody interested in a cheap IMU?

Posted by Brandon G on 03 February 2011 - 09:18 PM in General Discussion

I'd take one as well, that was the board i was going to buy but didnt want the old magnetometer, polling via i2c works for my application



#8955 Anybody interested in a cheap IMU?

Posted by Brandon G on 03 February 2011 - 10:48 PM in General Discussion

Chris will be able to answer better, but yes from what i understand there would be no compensation and no mcu. from the razor one here's an implementation by zerov https://code.google..../QuadroLib/Ahrs which might give you an idea of the data coming down



#8966 Anybody interested in a cheap IMU?

Posted by Brandon G on 04 February 2011 - 01:51 AM in General Discussion

I think it really depends on the applications requirements. In my case I am controlling a loop and want to read every 200ms which I think can be acomplished and the overhead is ok. I am no expert though I'm learning as I go. What are you using the imu for?



#8924 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...

Posted by Brandon G on 03 February 2011 - 04:10 AM in General Discussion

like i said, aint great but one thing i have noticed about netmf is a major need for optimization and special cases, elegance is sacrificed for speed



#9468 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...

Posted by Brandon G on 14 February 2011 - 12:07 AM in General Discussion

not a problem Fabien, same goes here. I am really not happy with what i've posted so far and starting to think aboutserialization in terms of config and xml and using weak references space lately



#8783 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...

Posted by Brandon G on 01 February 2011 - 01:20 AM in General Discussion

So i started to get into it and I have come across some road blocks and cant seem to find a way around it. Reflection being limited i cant even call CreateInstance() or the other method i had up my sleeve FormatterServices.GetUninitializedObject() or Activator.CreateInstance, is there anyway to initialize an object from a string at all in netmf, otherwise i think we're shit out of luck short of some ugly case statements



#7630 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...

Posted by Brandon G on 14 January 2011 - 03:44 AM in General Discussion

greg and i worked together for 5 years that initial implementation was ours, albeit naive it suited our purposes. They are all teeny, almost any well written serialization implementations will be, i'd love to help out.



#7616 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...

Posted by Brandon G on 13 January 2011 - 11:02 PM in General Discussion

i think if we just did value types and collections of value types with recursion of more complex obecjts as long as they were all inheriting the same interface to start we could open it up from there, i'm new here and wondering if you guys have a svn or git repository going yet? if not I could host something up on mine if need be. Hopefully if i can help on the code side you guys can scratch my back a bit on the hardware side



#7610 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...

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

Chris are the interfaces there to be implemented? IFormatter etc http://codebetter.co...-serialization/ old but still works



#7655 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...

Posted by Brandon G on 14 January 2011 - 04:41 PM in General Discussion

Not a problem, will be a couple weeks before i can start but look forward to it



#7609 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...

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

building a lightweight serializer wouldnt be too hard, I have some old source that could work, its optimistic and only handles simple objects. I will more than likely be re-visiting it soon in my quad project. What are you wanting to serialize (what types of objects)?



#8860 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...

Posted by Brandon G on 02 February 2011 - 05:18 AM in General Discussion

Heres a very prelim write of this with some simple implementations as you can see i am putting the responsibility on the ISerializable object for now, not a full object graph, as i extend this i will update, right now its pretty ugly and specific


EDIT: didnt like what i posted earlier, here`s a revamp
using Quad.Net.Commons.Serialization;

namespace Quad.Net.Commons.Logging
{
    public interface ILogger
    {
        void Flush();
        void Write(ISerializable obj);
    }
}

using System.IO;
using Quad.Net.Commons.Serialization;

namespace Quad.Net.Commons.Logging
{
    public class PersistenceWriter : ILogger
    {
        private readonly IBinaryFormatter _formatter;
        private readonly string _fileName;
        private readonly FileStream _fileStream;

        public PersistenceWriter(string fileName, IBinaryFormatter formatter)
        {
            _formatter = formatter;
            _fileName = fileName;
            _fileStream = new FileStream(_fileName, FileMode.OpenOrCreate, FileAccess.Write, FileShare.None, 512);
        }

        public void Flush()
        {
            _fileStream.Flush();
        }

        
        public void Write(ISerializable obj)
        {
            _formatter.Serialize(_fileStream, obj);

        }
    }
}


using System.IO;
using Quad.Net.Commons.Serialization;

namespace Quad.Net.Commons.Logging
{
    public class PersistanceReader
    {
        private readonly IBinaryFormatter _binaryFormatter;

        public PersistanceReader(IBinaryFormatter binaryFormatter)
        {
            _binaryFormatter = binaryFormatter;
            
        }
        public ISerializable[] GetMessages(string readPath)
        {
            FileStream readFile = new FileStream(readPath, FileMode.Open, FileAccess.Read);
            return _binaryFormatter.Deserialize(readFile);
        }
    }
}

using System;
using System.IO;

namespace Quad.Net.Commons.Serialization
{
    public interface IBinaryFormatter
    {
        void Serialize(Stream stream, Object graph);//not implemented
        ISerializable[] Deserialize(Stream stream);
        void Serialize(Stream stream, ISerializable graph);//optimistic
    }
}


namespace Quad.Net.Commons.Serialization
{
    public interface ISerializable //:  where T : new() in classic C# this is what i would do force a parameterless contructor, cant do thisin netmf
    {
        byte[] Serialize();
        object Deserialize(byte[] buffer);
    }
}

using System;
using System.Collections;
using System.IO;

namespace Quad.Net.Commons.Serialization
{
    public class TelemetryFormatter:IBinaryFormatter
    {
        public void Serialize(Stream stream, object graph)
        {
            throw new NotImplementedException();
        }

        public ISerializable[] Deserialize(Stream stream)
        {
            ISerializable[] items = new ISerializable[stream.Length/44];
            int counter = 0;
            while (stream.Position < stream.Length)
            {
                byte[] buffer = new byte[44];
                stream.Read(buffer, 0, 44);
                ISerializable item  = (ISerializable) typeof(TelemetryData).GetConstructor(new Type[0]).Invoke(new object[0]);
                item.Deserialize(buffer);
                items[counter] = item;
                counter++;
            }
            return items;
        }

        public void Serialize(Stream stream, ISerializable graph)
        {
            byte[] buffer = graph.Serialize();
            stream.Write(buffer, 0, buffer.Length);
        }
    }
}


using System;
using Microsoft.SPOT.Hardware;
using Quad.Net.Avionics;
using Quad.Net.Commons.Serialization;
using Quad.Net.Commons.Utilities;

namespace Quad.Net.FlightController
{
    public class TelemetryData : ISerializable
    {
        private readonly AircraftPrincipalAxes  _gyroAxes;
        private readonly AircraftPrincipalAxes _radioAxes;
        private readonly AircraftPrincipalAxes _pidAxes;
        private long _currentTime;
        private readonly byte[] _buffer;
        public TelemetryData()
        {
            _gyroAxes= new AircraftPrincipalAxes(0,0,0);
            _radioAxes = new AircraftPrincipalAxes(0, 0, 0);
            _pidAxes = new AircraftPrincipalAxes(0, 0, 0);
            _currentTime = DateTime.Now.Ticks;
            _buffer = new byte[44];
        }

        public void Update(AircraftPrincipalAxes gyroAxes, AircraftPrincipalAxes radioAxes, AircraftPrincipalAxes pidAxes, long currentTime)
        {
            _gyroAxes.Update(gyroAxes.Pitch,gyroAxes.Roll,gyroAxes.Yaw);
            _radioAxes.Update(radioAxes.Pitch, radioAxes.Roll, radioAxes.Yaw);
            _pidAxes.Update(pidAxes.Pitch, pidAxes.Roll, pidAxes.Yaw);
        }

        public byte[] Serialize()
        {
            Utility.InsertValueIntoArray(_buffer, 0, 4, (uint)(_currentTime >> 32));
            Utility.InsertValueIntoArray(_buffer, 4, 4, (uint)_currentTime);
            Utility.InsertValueIntoArray(_buffer, 8, 4, (uint)_gyroAxes.Pitch);
            Utility.InsertValueIntoArray(_buffer, 12, 4, (uint)_gyroAxes.Roll);
            Utility.InsertValueIntoArray(_buffer, 16, 4, (uint)_gyroAxes.Yaw);

            Utility.InsertValueIntoArray(_buffer, 20, 4, (uint)_radioAxes.Pitch);
            Utility.InsertValueIntoArray(_buffer, 24, 4, (uint)_radioAxes.Roll);
            Utility.InsertValueIntoArray(_buffer, 28, 4, (uint)_radioAxes.Yaw);

            Utility.InsertValueIntoArray(_buffer, 32, 4, (uint)_pidAxes.Pitch);
            Utility.InsertValueIntoArray(_buffer, 36, 4, (uint)_pidAxes.Roll);
            Utility.InsertValueIntoArray(_buffer, 40, 4, (uint)_pidAxes.Yaw);
            return _buffer;
        }

        public object Deserialize(byte[] buffer)
        {
            _currentTime = BitConverter.ToLong(buffer, 0);
            _gyroAxes.Update(
                Utility.ExtractValueFromArray(buffer, 8, 4),
                Utility.ExtractValueFromArray(buffer, 12, 4),
                Utility.ExtractValueFromArray(buffer, 16, 4)
                );
            _radioAxes.Update(
                Utility.ExtractValueFromArray(buffer, 20, 4),
                Utility.ExtractValueFromArray(buffer, 24, 4),
                Utility.ExtractValueFromArray(buffer, 28, 4)
                );
            _pidAxes.Update(
                Utility.ExtractValueFromArray(buffer, 32, 4),
                Utility.ExtractValueFromArray(buffer, 36, 4),
                Utility.ExtractValueFromArray(buffer, 40, 4)
                );
            return this;
        }

        public override string ToString()
        {
            //csv format
            return _currentTime + "," +
                   _gyroAxes.Pitch + "," +
                   _gyroAxes.Roll + "," +
                   _gyroAxes.Yaw + "," +
                   _radioAxes.Pitch + "," +
                   _radioAxes.Roll + "," +
                   _radioAxes.Yaw + "," +
                   _pidAxes.Pitch + "," +
                   _pidAxes.Roll + "," +
                   _pidAxes.Yaw + ",";
        }
    }
}




#8811 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...

Posted by Brandon G on 01 February 2011 - 04:34 PM in General Discussion

i ended up finding that shortly thereafter, thanks Corey. I've stubbed out the whole thing just going for some optimization now. My current application for it is the quadrocopter so has to be heavily optimized and optimistic, a more generic library can be made off it after, will post when done



#8861 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...

Posted by Brandon G on 02 February 2011 - 05:20 AM in General Discussion

oh and i havent written tests for it yet, once i have and made this a little more generic i will psot as a zip




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.