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.

pxl357

Member Since 20 Aug 2011
Offline Last Active Sep 16 2011 05:37 PM
-----

Topics I've Started

Motor Shield alimentation

03 September 2011 - 05:27 AM

Hey Guys !

I'm continuing to work on my project and i face a kind of weird little issue.
I can't have my motors running backwards. I'm using the Dfrobot 1A shield and a 9v battery plug directly on the netduino.

I put a basic test :

//FWD            
PWM Motor1Speed = new PWM(Pins.GPIO_PIN_D5);
PWM Motor2Speed = new PWM(Pins.GPIO_PIN_D6);
OutputPort Motor1Direction = new OutputPort(Pins.GPIO_PIN_D9, false);
OutputPort Motor2Direction = new OutputPort(Pins.GPIO_PIN_D10, false);


Motor1Direction.Write(false);
Motor1Speed.SetDutyCycle(100);
Motor2Direction.Write(false);
Motor2Speed.SetDutyCycle(100);


//BWD
PWM Motor1Speed = new PWM(Pins.GPIO_PIN_D5);
PWM Motor2Speed = new PWM(Pins.GPIO_PIN_D6);
OutputPort Motor1Direction = new OutputPort(Pins.GPIO_PIN_D9, false);
OutputPort Motor2Direction = new OutputPort(Pins.GPIO_PIN_D10, false);

Motor1Direction.Write(true);
Motor1Speed.SetDutyCycle(100);
Motor2Direction.Write(true);
Motor2Speed.SetDutyCycle(100);


Both test go forward.

I wonder if it's an alimentation issue or a code issue.

Any ideas or similar experience ?

PXL

Socket Server Questions

01 September 2011 - 04:06 AM

Hello all , I finally got my Netduino working on the web fine and start to work on a socket server. So i sucessfully create a server but when i connect to it and send some datas it's directly close the connexion. I mean the client can't send multiple request. I made a super basic example : using System; using System.Threading; using Microsoft.SPOT; using Microsoft.SPOT.Hardware; using SecretLabs.NETMF.Hardware; using SecretLabs.NETMF.Hardware.NetduinoPlus; using Microsoft.SPOT.Net.NetworkInformation; using Microsoft.SPOT.Net; using System.Net.Sockets; using System.Net; using System.Text; namespace NetduinoApplication2 { public class Program { public static void Main() { using (System.Net.Sockets.Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) { NetworkInterface networkInterface = NetworkInterface.GetAllNetworkInterfaces()[0]; networkInterface.EnableStaticIP("192.168.1.35", "255.255.255.0", "192.168.1.2"); socket.Bind(new IPEndPoint(IPAddress.Parse("192.168.1.35"), 80)); socket.Listen(1); using (Socket commSocket = socket.Accept()) { if (commSocket.Poll(-1, SelectMode.SelectRead)) { byte[] bytes = new byte[commSocket.Available]; int count = commSocket.Receive(bytes); string request =new String(Encoding.UTF8.GetChars(bytes)); Debug.Print(request); } } } } } } If you send a string to the socket ( after connection ) you can't send a second one. Anyone have an idea how to fix it ? Thanks ! PXL

Socket and DCHP

31 August 2011 - 04:31 AM

Hey Everybody , I have some issues about getting an ip for a socket server. I tried several method i'm struggling on solve this issue. After some reading i understood the best approach is to actually set a static ip for the netduino. I was wondering if anybody would be kind enough to provide me an example or a step by step explanation ? I tried by myself to set the Ip/Mac NetworkInterface networkInterface = NetworkInterface.GetAllNetworkInterfaces()[0]; networkInterface.PhysicalAddress = new byte[] { 0x5C, 0x86, 0x4A, 0x00, 0x00, 0x00 }; networkInterface.EnableStaticIP("192.168.0.75", "255.255.255.0", "192.168.1.2"); I tried to parse an Ipad as well but nothing seems to work. Thanks ! Pxl

Ultrasonic sensor

29 August 2011 - 02:10 AM

Hell Everybody , I would like to know ( before order it ) if anybody had experience with this Ultrasonic Sensor : http://www.dfrobot.c...or_(SKU:SEN0001) It's look like a nice option to cover several kind of detection. Thanks ! PXL

Netduino Plus Memory etc

25 August 2011 - 02:41 AM

Hey Everybody , I'm working on a 2wheels robot project. I would like to know if it realist to assume the Netduino plus will have enough memory to be drive by command send via socket server ? The idea is to make a have a autonomous robot i can take control over socket. Thanks! PXL

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.