Hey stefan did you figure ? I have the same issue
If i used the Open(ssid,passphrase) it's fix the pb , at least the error dont appear anymore.
But the ip of the netduino stay at 0.0.0.0 i try to setup it manually but it throw an error.
  | ||||||||||||||
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's ContentThere have been 18 items by pxl357 (Search limited from 30-March 23) #17820 Webserver on NetduinoPlus + (wired or wireless) libraryPosted by pxl357 on 10 September 2011 - 04:29 AM in Project Showcase
If i used the Open(ssid,passphrase) it's fix the pb , at least the error dont appear anymore. But the ip of the netduino stay at 0.0.0.0 i try to setup it manually but it throw an error. #17816 Webserver on NetduinoPlus + (wired or wireless) libraryPosted by pxl357 on 10 September 2011 - 03:02 AM in Project Showcase
Hey stefan did you figure ? I have the same issue #17626 Motor Shield alimentationPosted by pxl357 on 06 September 2011 - 01:44 AM in Netduino Plus 2 (and Netduino Plus 1)
Yep that was the issue ! Now it's working ! Thanks a lot ! I will try to figure out a battery solution to have more volt and a separate alimentation probably ! Pxl #17599 Motor Shield alimentationPosted by pxl357 on 05 September 2011 - 08:09 PM in Netduino Plus 2 (and Netduino Plus 1)
ok here the informations :
Battery Display 7,43 volt Using : Motor1Direction.Write(false); Motor1Speed.SetDutyCycle(100); Motor2Direction.Write(false); Motor2Speed.SetDutyCycle(100);m1 Output : -2,65 v m2 Output : 2,59 Motor1Direction.Write(true); Motor1Speed.SetDutyCycle(100); Motor2Direction.Write(true); Motor2Speed.SetDutyCycle(100);m1 Output :-2,54 v m2 Output : 2,51 v I'm surprise the voltage is sow low. The battery is directly plug to the netduino and not the motor shield. Any idea? If it's too hard to figure i will order the other motor shield and a better battery ! Thanks for your help PXl #17542 Motor Shield alimentationPosted by pxl357 on 04 September 2011 - 07:42 PM in Netduino Plus 2 (and Netduino Plus 1)
Oh ok i used the wrong shield ! I bought this one : http://www.dfrobot.c...d&product_id=59 SHould i buy the l298n ?? #17507 Motor Shield alimentationPosted by pxl357 on 04 September 2011 - 05:53 AM in Netduino Plus 2 (and Netduino Plus 1)
Sorry i suxx a bit at electronic , is the jumper are the blue connector ? It was basically already solder when i get it. So i assume it ok. I wire everything following the shield wiki as well.
I will check the voltage tomorrow see what i have !
#17493 Motor Shield alimentationPosted by pxl357 on 03 September 2011 - 06:21 PM in Netduino Plus 2 (and Netduino Plus 1)
Hey Stephan !
I used the library and i have the same exact result the motor always go forward.
That's why i start to think about an alimentation issue. How do you power the motors ? FOr now i have a 9v battery plug on the netduino
#17469 Motor Shield alimentationPosted by pxl357 on 03 September 2011 - 05:27 AM in Netduino Plus 2 (and Netduino Plus 1)
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 #17468 Socket Server QuestionsPosted by pxl357 on 03 September 2011 - 05:21 AM in Netduino Plus 2 (and Netduino Plus 1)
Great help thanks a lot ! I finally made it work , the keep alive only switch to false when a client disconnect.
Thanks a lot again !
#17426 Socket Server QuestionsPosted by pxl357 on 02 September 2011 - 04:18 AM in Netduino Plus 2 (and Netduino Plus 1)
Great Help thanks for your comments !
So it's finally working , i have one different issue now. When i get the request as a string and try to do something else it's close the connection again.
I have an exemple when i use stephan drivers to control 2 motors from 2 basic request ( start /stop ) , in this example ( i put the source as well in my post ) the connection close just after the motor start or stop.
Any ideas if i miss something in term of thread management etc ?
using System;
using Microsoft.SPOT;
using System.Net.Sockets;
using Microsoft.SPOT.Net.NetworkInformation;
using System.Net;
using System.Text;
using StefanCo.NETMF.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.NetduinoPlus;
using System.Threading;
using Microsoft.SPOT.Hardware;
namespace BetterSocket
{
public class Server : IDisposable
{
private Socket socket = null;
public Server(string ip, int port)
{
MotorShield motor = new MotorShield(Pins.GPIO_PIN_D5, Pins.GPIO_PIN_D9, Pins.GPIO_PIN_D6, Pins.GPIO_PIN_D10);
NetworkInterface networkInterface = NetworkInterface.GetAllNetworkInterfaces()[0];
networkInterface.EnableStaticIP(ip, "255.255.255.0", "192.168.1.2");
using (System.Net.Sockets.Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
{
socket.Bind(new IPEndPoint(IPAddress.Parse(ip), port));
Debug.Print("Bind the socket client to " + ip);
socket.Listen(1);
while (true)
{
using (Socket currentSocket = socket.Accept())
{
bool keepAlive = true;
while (keepAlive)
{
if (currentSocket.Poll(-1, SelectMode.SelectRead))
{
byte[] bytes = new byte[currentSocket.Available];
int count = currentSocket.Receive(bytes);
string request = new String(Encoding.UTF8.GetChars(bytes));
if (request == "start")
{
currentSocket.Send(Encoding.UTF8.GetBytes("\r\n" + "Start Engine"));
motor.SetState(MotorShield.Motors.Motor1, 10);
motor.SetState(MotorShield.Motors.Motor2, 10);
keepAlive = false;
}
else if (request == "stop")
{
currentSocket.Send(Encoding.UTF8.GetBytes("\r\n" + "You ask for a c"));
motor.SetState(MotorShield.Motors.Motor1, 0);
motor.SetState(MotorShield.Motors.Motor2, 0);
keepAlive = false;
}
Debug.Print("Request "+request);
}
}
Debug.Print("Server Close");
}
}
}
}
#region IDisposable Members
public void Dispose()
{
if (socket != null) socket.Close();
}
#endregion
}
}
Thanks !
PXL
#17371 Socket Server QuestionsPosted by pxl357 on 01 September 2011 - 04:06 AM in Netduino Plus 2 (and Netduino Plus 1)
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
#17304 Socket and DCHPPosted by pxl357 on 31 August 2011 - 04:31 AM in Netduino Plus 2 (and Netduino Plus 1)
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
#17221 Ultrasonic sensorPosted by pxl357 on 29 August 2011 - 02:10 AM in Netduino Plus 2 (and Netduino Plus 1)
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
#17036 Netduino Plus Memory etcPosted by pxl357 on 25 August 2011 - 03:57 AM in Netduino Plus 2 (and Netduino Plus 1)
Thanks a lot Chris !
I will keep working on my project and share my result when i will have decent stuff to share !
PXl
#17033 Netduino Plus Memory etcPosted by pxl357 on 25 August 2011 - 02:41 AM in Netduino Plus 2 (and Netduino Plus 1)
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
#16902 Motor Shield ChoicePosted by pxl357 on 21 August 2011 - 04:39 AM in Netduino Plus 2 (and Netduino Plus 1)
Ok after a few investigation on the forum and website , i think this one should work without any "tricks" : http://www.dfrobot.c...9&product_id=59
It's it's use the PWM which match with the netduino.
Anybody have experience with it and can eventually be gentle enough to confirm it's actually works ?
Thanks !
PXl
#16889 SD Card not workingPosted by pxl357 on 20 August 2011 - 10:44 PM in Netduino Plus 2 (and Netduino Plus 1)
Hello ,
I start to work with a Kingston 2 gig SD card and can't get it to work.
string[] rootDirs = Directory.GetDirectories(@"\");
>>rootDirs return \\WINFS and \\ROOT
DirectoryInfo rootDirectory = new DirectoryInfo(@"\\SD\\");
>> rootDirectory.Exist return 0
OutputPort SdPower = new OutputPort((Cpu.Pin)25, false); // ensure that the SD card is powered
InputPort sdDetected = new InputPort((Cpu.Pin)57, false, Port.ResistorMode.PullUp);
>> sdDetected return true.
The SD card is formated in FAT and contains tiny text files i added manually with my computer.
I used different framework and my current setup is :
DeviceInfo:
HAL build info: 4.1.2821.0, Netduino Plus by Secret Labs LLC
OEM Product codes (vendor, model, SKU): 34, 177, 4097
Serial Numbers (module, system):
00000000000000000000000000000000
0000000000000000
Solution Build Info: 4.1.0.5, Netduino Plus by Secret Labs LLC
AppDomains:
default, id=1
Assemblies:
mscorlib,4.1.2821.0
Microsoft.SPOT.Native,4.1.2821.0
Microsoft.SPOT.Hardware,4.1.2821.0
Microsoft.SPOT.Net,4.1.2821.0
System,4.1.2821.0
Microsoft.SPOT.IO,4.1.2821.0
System.IO,4.1.2821.0
Microsoft.SPOT.Hardware.SerialPort,4.1.2821.0
Microsoft.SPOT.Hardware.Usb,4.1.2821.0
SecretLabs.NETMF.Hardware,4.1.0.0
SecretLabs.NETMF.Diagnostics,4.1.0.0
ListenForLedCommand,1.0.0.0
SecretLabs.NETMF.Hardware.NetduinoPlus,4.1.0.0
Any idea ?
Thanks !
PXl
#16860 Motor Shield ChoicePosted by pxl357 on 20 August 2011 - 02:08 AM in Netduino Plus 2 (and Netduino Plus 1)
Hello Netduino Folks !
I'm starting a netduino project and need some advices in term of shield choice.
I'm working on a 2wheels robot based on this chassis http://www.bizoner.c...letdsoa8onj5hm0
The chassis is driven by 2 motors so i bough a ardumoto shield in order to drive them but it seems not ideal as i have to actually tweak the shield ( and disable 2 pins i will need ) to make it work.
I was wondering if anyone know which is the best motor shield choice for the netduino plus wich work directly out of the box.
Thanks !
Pxl
| ||||||||||||||
|
||||||||||||||
This webpage is licensed under a Creative Commons Attribution-ShareAlike License. | ||||||||||||||