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.

Flores's Content

There have been 64 items by Flores (Search limited from 06-June 23)


By content type

See this member's


Sort by                Order  

#367 Steps to restore an Erased Netduino

Posted by Flores on 13 August 2010 - 06:35 PM in Netduino 2 (and Netduino 1)

All,

Can someone provide the steps needed to restore an Netduino that has been erased? Believe it or not.. I managed to accidentally erase my Netduino during testing...

Jason.


How did you do that. Could you share a tip so it won't happen to us too?

Thanks



#2862 Introducing Netduino Plus -- Notes

Posted by Flores on 25 September 2010 - 07:56 AM in Netduino Plus 2 (and Netduino Plus 1)

Chris, I have no microSD atm, so will need to buy one. Could you post a list of cards that are known to work?



#2807 How to use the new functionalities

Posted by Flores on 24 September 2010 - 08:24 PM in Netduino Plus 2 (and Netduino Plus 1)

Sure you can.. I guess this would be the easiest:

            NetworkInterface[] networkInterfaces = NetworkInterface.GetAllNetworkInterfaces();  
  
            foreach (NetworkInterface networkInterface in networkInterfaces)  
            {  
                networkInterface.EnableDhcp();
            }

When I said hardcoded.. I really meant 'defaulted to'..



#2809 How to use the new functionalities

Posted by Flores on 24 September 2010 - 08:27 PM in Netduino Plus 2 (and Netduino Plus 1)

Oh.. won't EnableDhcp() work ?



#2804 How to use the new functionalities

Posted by Flores on 24 September 2010 - 08:15 PM in Netduino Plus 2 (and Netduino Plus 1)

Here's how to send data:

using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;
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))
            {

                IPHostEntry entry = Dns.GetHostEntry("192.168.5.111");
                IPAddress address = entry.AddressList[0];
                IPEndPoint endpoint = new IPEndPoint(address, 80);

                socket.Connect(endpoint);
                socket.Send(Encoding.UTF8.GetBytes("Hallo Netduino plus"));
            }

        }

    }
}



#2813 How to use the new functionalities

Posted by Flores on 24 September 2010 - 08:36 PM in Netduino Plus 2 (and Netduino Plus 1)

To make it complete.. here is how to receive data

using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;
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))
            {

                socket.Bind(new IPEndPoint(IPAddress.Any, 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);

                        Debug.Print(new String(Encoding.UTF8.GetChars(bytes)));
                    }
                }                
            }
        }
    }
}

Have fun !!!



#2814 How to use the new functionalities

Posted by Flores on 24 September 2010 - 08:38 PM in Netduino Plus 2 (and Netduino Plus 1)

Btw.. I haven't tested the code above yet.. I'll have to get a switch to connect the netduino.. i'm on wireless only atm



#2824 How to use the new functionalities

Posted by Flores on 24 September 2010 - 09:17 PM in Netduino Plus 2 (and Netduino Plus 1)

In theory, yes. But some PCs have auto-detect and will swap the RX/TX if you use teh "wrong" cable.


Ha.. connected a cable to my notebook and all the lights come on.. I guess it's working.
Will be testing more tomorrow.. bedtime now.



#2817 How to use the new functionalities

Posted by Flores on 24 September 2010 - 08:49 PM in Netduino Plus 2 (and Netduino Plus 1)

Are you running on a Windows PC with an Ethernet jack? You could set up network connection sharing and plug the Netduino into your PC...


Good idea... won't I be needing a cross cable for that?



#2815 How to use the new functionalities

Posted by Flores on 24 September 2010 - 08:43 PM in Netduino Plus 2 (and Netduino Plus 1)

And for UDP, use:

new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp))

And in the client:

SendTo instead of Send

In the server:

Bind instead of Listen
and
ReceiveFrom instead of Receive



#2799 How to use the new functionalities

Posted by Flores on 24 September 2010 - 07:48 PM in Netduino Plus 2 (and Netduino Plus 1)

Aha.. cool.

For those interresed, here's how to list your network properties:

using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;
using Microsoft.SPOT.Net.NetworkInformation;

namespace NetduinoApplication2
{
    public class Program
    {

        public static void Main()
        {
            // write your code here
            NetworkInterface[] networkInterfaces = NetworkInterface.GetAllNetworkInterfaces();

            foreach (NetworkInterface networkInterface in networkInterfaces)
            {
                Debug.Print("IP Address: " + networkInterface.IPAddress);
                Debug.Print("Subnet mask " + networkInterface.SubnetMask);
            }


        }

    }
}

Seems like my netduino plus is hardcoded to IP static IP address 192.168.5.150/24



#2794 How to use the new functionalities

Posted by Flores on 24 September 2010 - 07:07 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi,

I've got my Netduino Plus in today.
And i'm wondering how to use the new functionality... I guess I must include some new assemblies? if so where can I find them?

Can I use this? Beta assmblies for SD card

And this one? Beta assmblies for ethernet

Thanks



#298 Unboxing: first impressions?

Posted by Flores on 12 August 2010 - 02:33 PM in Netduino 2 (and Netduino 1)

Could be.. it looks like the box has been opened (because it taped shut now with a dutch postal service tape) Still would be a little strange that if they opened the box they would leave the boxes out...



#294 Unboxing: first impressions?

Posted by Flores on 12 August 2010 - 08:29 AM in Netduino 2 (and Netduino 1)

Ordered with Makershed 2 units to be shipped to the Netherlands, and they did come with a cable. But not in a box, mine were in their anti static bags only.. They look very cool, even smaller than I thought they would be.



#307 HXT 900 Servo

Posted by Flores on 12 August 2010 - 05:35 PM in Netduino 2 (and Netduino 1)

The signals to the servos are just pulses which direct the servo's position. It's the power from the 5V/3.3V header which is providing the power.

The Netduino can provide 100s of mA of power. The on-board power regulators are rated at 800mA. You can draw a few 100 mA of power for your projects...not a problem. Just remember to use an external power supply (via the power barell or VIN connector) if you're drawing a bunch of current.

Chris


I was reffering to the maximum output of a digital output. That is 17mA right?



#300 HXT 900 Servo

Posted by Flores on 12 August 2010 - 02:41 PM in Netduino 2 (and Netduino 1)

Did you directly attach the servo to the outputs? How can that not break your board? I've read somewhere that the max output I is 17mA.. surely the servo is more than that?



#2412 Buzz a piezo speaker?

Posted by Flores on 18 September 2010 - 05:30 AM in Netduino 2 (and Netduino 1)

Don't forget that the current you can draw from the netduino pin outs is not that high. Be sure to check that and use a driver in between if your device is able to draw more (milli) amps.



#7599 If you were to get two netduinos to talk to each other, what would you use?

Posted by Flores on 13 January 2011 - 08:48 PM in Netduino 2 (and Netduino 1)

Serial.. by far the easiest.



#7601 If you were to get two netduinos to talk to each other, what would you use?

Posted by Flores on 13 January 2011 - 08:55 PM in Netduino 2 (and Netduino 1)

Connect pin 1 on netduino 1 to pin 2 on netduino 2, pin 2 on netduino 1 to pin 1 on netduino 2, and connect the grounds.

On the sender:

  1:          public static void Main()
   2:          {
   3:              SerialPort port = new SerialPort(SerialPorts.COM1,115200);
   4:              OutputPort led = new OutputPort(Pins.ONBOARD_LED, false);
   5:   
   6:              port.Open();
   7:   
   8:              while (true)
   9:              {
  10:                  led.Write(true);
  11:                  port.Write(buff, 0, buff.Length);
  12:                  Thread.Sleep(100);
  13:                  led.Write(false);
  14:                  Thread.Sleep(900);
  15:                  buff = Encoding.UTF8.GetBytes(DateTime.Now.TimeOfDay.ToString());
  16:              }
  17:          }

On the receiver:

  1:          public static void Main()
   2:          {
   3:   
   4:              SerialPort serial = new SerialPort(SerialPorts.COM1, 115200);
   5:              serial.ReadTimeout = 8;
   6:              serial.DataReceived += new SerialDataReceivedEventHandler(serial_DataReceived);
   7:              serial.Open();
   8:              while (true)
   9:              {
  10:   
  11:                  Thread.Sleep(Timeout.Infinite);
  12:              }
  13:   
  14:          }
  15:   
  16:          static void serial_DataReceived(object sender, SerialDataReceivedEventArgs e)
  17:          {
  18:              int bytesReceived = ((SerialPort)sender).BytesToRead;
  19:              byte[] bytes = new byte[bytesReceived];
  20:              ((SerialPort)sender).Read(bytes, 0, bytes.Length);
  21:              string received = new string(System.Text.Encoding.UTF8.GetChars(bytes));
  22:              Debug.Print(received); 
  23:   
  24:          }



#1409 Chris I figured out that error causing bug! Not good for me though

Posted by Flores on 27 August 2010 - 09:28 AM in Netduino 2 (and Netduino 1)

Same here.. happens sometimes.. can't pinpoint it..



#38 PWM maximum frequency

Posted by Flores on 04 August 2010 - 11:49 AM in Netduino 2 (and Netduino 1)

Please have a look at page 426 for waveform period formulas.


Does that mean there is no hardware limitation? Based on my calculations I can easily go above 20Kkz.. is that correct?

Thanks



#47 PWM maximum frequency

Posted by Flores on 04 August 2010 - 03:08 PM in Netduino 2 (and Netduino 1)

Yes, And it would be great if the SetDutyCycle would take a floating point percentage (in my case). ...as I think of it, an integer would probably also do.. Thanks.



#36 PWM maximum frequency

Posted by Flores on 04 August 2010 - 11:22 AM in Netduino 2 (and Netduino 1)

Hi, Very cool project. I've been through the specs of the processor but can't find the answer to what the maximum frequency of the PWM is. Does anybody know?



#44 PWM maximum frequency

Posted by Flores on 04 August 2010 - 02:11 PM in Netduino 2 (and Netduino 1)

Chris, Thanks for the information. In my application I want to be able to modify the pulse width based on an analogue input, and use the netduino as a controller for a mosfet dimmer, with a frequency above 16Khz. So for me just being able to modify the pulse width from 0 to 100% would do. Thanks



#40 PWM maximum frequency

Posted by Flores on 04 August 2010 - 12:41 PM in Netduino 2 (and Netduino 1)

Okay cool thanks. I mean the build in PWM.




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.