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.

Ben Harel

Member Since 28 Sep 2012
Offline Last Active Sep 30 2013 01:58 PM
-----

Topics I've Started

Commercial use of Netduino

30 September 2013 - 12:54 PM

Hi!

I have a theoretical question. Is it legal for me to buy, let's say 100 Netduinos, use them all to build the same project and sell it in stores?

Again, very theoretical question :)

Thank you!


Motors not working properly - urgent

22 May 2013 - 06:36 PM

Hi!

I have a platform(tracked) with two engines. I want to write a simple program that moves the car forward, backward and spin both directions. I used the following circuit, from the netmftoolbox documentation.

http://netmftoolbox....ailable classes

 

The code doesn't work for me for some reason, the engines do what ever they want.

I am trying to use a code I found on YouTube(modified for my use and the 4.2 version), here is the code:

 

class Motor
    {
        private OutputPort directionPort;
        private PWM velocityPort;
        private uint velocity;
        private bool direction;
        public const bool Forward = true;
        public const bool Backward = false;
 
 
        public Motor(int PWMPortNum,Cpu.Pin pinForDirection)
        {
            //
            switch (PWMPortNum)
            {
                case 3: velocityPort = new PWM(PWMChannels.PWM_PIN_D3, 1000, 0.5, false); break;
                case 5: velocityPort = new PWM(PWMChannels.PWM_PIN_D5, 1000, 0.5, false); break;
                case 6: velocityPort = new PWM(PWMChannels.PWM_PIN_D6, 1000, 0.5, false); break;
                case 9: velocityPort = new PWM(PWMChannels.PWM_PIN_D9, 1000, 0.5, false); break;
                case 10: velocityPort = new PWM(PWMChannels.PWM_PIN_D10, 1000, 0.5, false); break;
                case 11: velocityPort = new PWM(PWMChannels.PWM_PIN_D11, 1000, 0.5, false); break;
                default: velocityPort = new PWM(PWMChannels.PWM_PIN_D5, 1000, 0.5, false); break;
            }
 
            directionPort = new OutputPort(pinForDirection, false);
            directionPort.DisableInterrupt();
        }
 
        public void Stop()
        {
            this.Velocity = 0;
            this.velocityPort.Stop();
        }
 
        public bool Direction
        {
            get { return this.direction; }
            set
            {
                this.direction = value;
                UpdateDirection();
            }
        }
 
        public uint Velocity
        {
            get { return this.velocity; }
            set
            {
                this.velocity = value;
                UpdateVelocity();
            }
        }
 
        private void UpdateVelocity()
        {
            velocityPort.DutyCycle = velocity;
            velocityPort.Start();
        }
 
        private void UpdateDirection()
        {
            directionPort.Write(Direction);
        }
    }

-------------------------------------------------------------------------

 class DriveSystem
    {
        private Motor leftMotor;
        private Motor rightMotor;
 
        public DriveSystem()
        {
            rightMotor = new Motor(5, Pins.GPIO_PIN_D4);
            leftMotor = new Motor(6, Pins.GPIO_PIN_D7);
        }
 
        public void Stop()
        {
            leftMotor.Stop();
            rightMotor.Stop();
        }
 
        public void SetLeftSpeed(uint speed)
        {
            leftMotor.Velocity = speed;
        }
 
        public void SetRightSpeed(uint speed)
        {
            rightMotor.Velocity = speed;
        }
    }

--------------------------------------------

 public class Program
    {
        public static void Main()
        {
            DriveSystem driveSystem = new DriveSystem();
            driveSystem.SetLeftSpeed(100);
            driveSystem.SetRightSpeed(1);
            Thread.Sleep(5000);
            driveSystem.Stop();
            driveSystem.SetLeftSpeed(1);
            driveSystem.SetRightSpeed(100);
            Thread.Sleep(5000);
            driveSystem.Stop();
            driveSystem.SetLeftSpeed(50);
            driveSystem.SetRightSpeed(50);
            Thread.Sleep(5000);
            driveSystem.Stop();
         
 
        }
 
    }

 

 

 

 

The robot is not moving if I give zero speed value to one of my motors. But the code above only moves one motor(the first) and at the second one - nothing. Only when it gets to the part when both of them should go it - it works.

 

 

I am in desperate need of help. I busted my head trying to get it working for the last month, and the project is due tomorrow.(My project is a robot controlled by motion captured from a camera, so I need the robot...)

Thank you

 


Can't ping(on a network) my netduino+

10 April 2013 - 08:51 PM

Hi.

I have a netduino+, and I configured it using MFDeploy using this settings:

(DHCP disabled)

Static IP address: 10.0.0.44

Subnet Mask: 255.255.255.0

Default Gateway: 10.0.0.138(my router's IP address)

MAC Address: my n+ MAC address

DNS Primary Address: 8.8.8.8

DNS Secondary Address: 8.8.4.4

 

I used this wiki page http://wiki.netduino...duino-Plus.ashx

 

But when I ping through cmd: ping 10.0.0.44

I get Destination Host Unreachable error from my computer. What could be the problem? both of the DNS addresses I used, are from the settings in the wiki page, and I have no idea if i need to change them according to my network/service provider. Thank you!

 

 

***EDIT***

Now that I'm checking, if I ping the netduino+ on MFDeploy, it is always says TinyBooter, instead of TinyClr.Is that a problem?


USB Device Not Recognized

03 April 2013 - 06:37 PM

Hi. I have an N+ that worked and run a few simple projects before. After a couple of months lying in his box in a drawer, I plugged it to check its network settings to start a new project, but in MFDeploy, when I ping it it said TinyBooter or something like that, instead of TinyClr. I connected it to the pc without pressing the button. After I got tired of messing around with it, I decided to erase it, so I did, but still nothing. I decided to erase it completely and install the firmware all over again, and I deleted the drivers. Since then, when I plug the N+ to the computer(windows 7 32 bit) I get an error from device manager - USB Device Not Recognized. What can I do? I tried everything. This is very urgent, I have less than a month to complete a HUGE project by myself.


How do I connect Netduino+ to a pc wireless?

27 February 2013 - 01:13 PM

How can I connect my Netduino+ to my computer wireless? Thank you!

(No cables between the robot and any router, unless the router is on the robot and not connecting to anything else)


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.