- Netduino Forums
- → Brandon G's Content
Brandon G's Content
There have been 92 items by Brandon G (Search limited from 29-March 23)
#8237 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 24 January 2011 - 03:04 AM in Project Showcase
#8234 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 24 January 2011 - 02:14 AM in Project Showcase
#8226 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 24 January 2011 - 01:01 AM in Project Showcase
#8224 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 24 January 2011 - 12:41 AM in Project Showcase
If i get hardware and some skills with soddering i could be up and running right now, I cleaned up alot of his code as well
Magoocas, its in source control
Here's an entry point to give u an idea
using Quad.Net.Commons.Configuration; using Quad.Net.ElectricSpeedController; using Quad.Net.Framework.Implementations.SecretLabs.PulseWidthModulation; using Quad.Net.Framework.PulseWidthModulation; using Quad.Net.Hardware.ElectricSpeedController; using Quad.Net.Hardware.Gyro; using Quad.Net.Hardware.Implementations.ElectricSpeedController.Implementations; using Quad.Net.Hardware.Implementations.Gyro; using Quad.Net.Hardware.Implementations.Radio; using Quad.Net.Hardware.Implementations.SecretLabs.Pin; using Quad.Net.Hardware.Pin; using Quad.Net.Hardware.Radio; using SecretLabs.NETMF.Hardware.Netduino; namespace Quad.Net.FlightController.Implementations.Netduino { public class Program { public static void Main() { IConfiguration settings = GetStaticSettings(); //Assumes one type of speed controller on quad ISpeedControllerSettings speedControllerSettings = new HobbyKingSs2530Settings(); ICpuPin pinFrontESC = new CpuPin(Pins.GPIO_PIN_D9); IPWM pwmFront = new SecretLabsPWM(pinFrontESC); SpeedController electricSpeedControllerFront = new SpeedController(speedControllerSettings, pwmFront); ICpuPin pinRearESC = new CpuPin(Pins.GPIO_PIN_D8); IPWM pwmRear = new SecretLabsPWM(pinRearESC); SpeedController electricSpeedControllerRear = new SpeedController(speedControllerSettings, pwmRear); ICpuPin pinRightESC = new CpuPin(Pins.GPIO_PIN_D7); IPWM pwmRight = new SecretLabsPWM(pinRightESC); SpeedController electricSpeedControllerRight = new SpeedController(speedControllerSettings, pwmRight); ICpuPin pinLeftESC = new CpuPin(Pins.GPIO_PIN_D6); IPWM pwmLeft = new SecretLabsPWM(pinLeftESC); SpeedController electricSpeedControllerLeft = new SpeedController(speedControllerSettings, pwmLeft); Motors motors= new Motors(electricSpeedControllerFront,electricSpeedControllerRear,electricSpeedControllerRight,electricSpeedControllerLeft); AxesController axesController = new AxesController(settings); IGyro gyro = new DefaultGyro(); IRadio radio = new DefaultRadio(); ControllerLoopSettings loopSettings = new ControllerLoopSettings(settings); Controller controller = new Controller(motors, axesController, gyro, radio, loopSettings); } private static IConfiguration GetStaticSettings() { InMemoryConfiguration config = new InMemoryConfiguration(); config["PitchDerivativeGain"] = "-.5"; config["PitchItegralGain"] = "0"; config["PitchProportionalGain"] = "1.2"; config["RollDerivativeGain"] = "-.5"; config["RollItegralGain"] = "0"; config["RollProportionalGain"] = "1.2"; config["YawDerivativeGain"] = "0"; config["YawItegralGain"] = "0"; config["YawProportionalGain"] = "3"; config["RadioLoopFrequency"] = "25"; config["SensorLoopFrequency"] = "300"; config["MotorLoopFrequency"] = "300"; config["LoopUnit"] = "2"; return config; } } }
#8204 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 23 January 2011 - 08:14 PM in Project Showcase
Magoocas,
I am impressed, i think we found our starting point and might want to involve Luke in what we are trying to do. if you've looked at source control you can see the implementational way in which im approaching.
We have
the Quad.Net solution with:
Framework (contains interfaces like IPWM)
Framwork.Implementations.SecretLabs (implementations like SecretLabs.NETMF.Hardware.PWM)
This allows for us to swap out framework specific implementations, ie using fez's custom framework
Hardware (contains generic interfaces for things like motors, gyros and escs)
Hardware.Implementations (implemntations of hardware like HobbyKings ss2530 ESC)
Hardware.Implementations.Secretlabs (implementations for things specific to netduino board, things like Pins)
Quad.Net.FlightController (main entry point but in the form of interfaces, requires an implemntation, like fez or netduino)
Quad.Net.FlightController.Netduino (specific implementation of netduino board and its settings)
Example of Netduino Implemntation with a speedcontroller
using System.Threading; using Quad.Net.ElectricSpeedController; using Quad.Net.Framework.Implementations.SecretLabs.PulseWidthModulation; using Quad.Net.Framework.PulseWidthModulation; using Quad.Net.Hardware.ElectricSpeedController; using Quad.Net.Hardware.Implementations.ElectricSpeedController.Implementations; using Quad.Net.Hardware.Implementations.SecretLabs.Pin; using Quad.Net.Hardware.Pin; using SecretLabs.NETMF.Hardware.Netduino; namespace Quad.Net.FlightController.Implementations.Netduino { public class Program { public static void Main() { ICpuPin pin = new CpuPin(Pins.GPIO_PIN_D9); ISpeedControllerSettings electricSpeedControllerSettings = new HobbyKingSs2530Settings(pin); IPWM pwm = new SecretLabsPWM(pin); Controller controller = new Controller(electricSpeedControllerSettings,pwm); for (int i = 0; i <= 100; i++) { controller.ElectricSpeedController.SetThrottle(i); Thread.Sleep(50); } } } }What i have tried to accomplish with this is a framework where any contributor can swap out hardware, gyros or microcontroller that supports netmf and specific implementations of framework, fez vs secretlabs
What i'm hoping will happen is a user can throw a new esc in, implement an ESC interface specific to that esc, and fly 5 minutes later, or a board or a gyro or eventually other sensors, if we keep this generic enough we could add features and hardware very quickly and segregate the project in a more agile framework than what is being done in other projects as well as allow for various combinations of hardware software with little or no effort. Everyone else code that i have veiwed ha been scary dependent on hardware or assumptions and thus why the project falls down
#8185 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 23 January 2011 - 05:44 PM in Project Showcase
#8184 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 23 January 2011 - 05:18 PM in Project Showcase
#8181 Coding style discussion
Posted by Brandon G on 23 January 2011 - 05:12 PM in General Discussion
#8118 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 22 January 2011 - 09:14 PM in Project Showcase
#8068 NetDuino Quadrocopter
Posted by Brandon G on 21 January 2011 - 05:45 PM in Netduino 2 (and Netduino 1)
#8066 NetDuino Quadrocopter
Posted by Brandon G on 21 January 2011 - 05:14 PM in Netduino 2 (and Netduino 1)
#7960 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 19 January 2011 - 11:42 PM in Project Showcase
#7959 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 19 January 2011 - 11:40 PM in Project Showcase
#7788 Fluent Interop 1.2
Posted by Brandon G on 17 January 2011 - 01:24 AM in Project Showcase
#7784 NetDuino Quadrocopter
Posted by Brandon G on 16 January 2011 - 11:51 PM in Netduino 2 (and Netduino 1)
#7783 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 16 January 2011 - 11:49 PM in Project Showcase
#7779 NetDuino Quadrocopter
Posted by Brandon G on 16 January 2011 - 09:44 PM in Netduino 2 (and Netduino 1)
Good call. BTW, the quantum is a constant and can be changed in code. We've never tried increasing it but it could be possible to increase it to, say, a few weeks/months. If everything is executing on a single thread and one is not using events or threading, this could be a valuable mod.
Chris
Chris where do i change this setting?
#7778 NetDuino Quadrocopter
Posted by Brandon G on 16 January 2011 - 09:42 PM in Netduino 2 (and Netduino 1)
#7775 System.Configuration
Posted by Brandon G on 16 January 2011 - 08:39 PM in General Discussion
#7773 Netduino ESC driver
Posted by Brandon G on 16 January 2011 - 07:24 PM in Netduino 2 (and Netduino 1)
#7750 Netduino ESC driver
Posted by Brandon G on 16 January 2011 - 07:25 AM in Netduino 2 (and Netduino 1)
#7665 NetDuino Quadrocopter
Posted by Brandon G on 14 January 2011 - 05:43 PM in Netduino 2 (and Netduino 1)
#7655 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...
Posted by Brandon G on 14 January 2011 - 04:41 PM in General Discussion
#7654 NetDuino Quadrocopter
Posted by Brandon G on 14 January 2011 - 04:38 PM in Netduino 2 (and Netduino 1)
#7635 NetDuino Quadrocopter
Posted by Brandon G on 14 January 2011 - 04:34 AM in Netduino 2 (and Netduino 1)
- Netduino Forums
- → Brandon G's Content
- Privacy Policy