- Netduino Forums
- → Flores's Content
Flores's Content
There have been 64 items by Flores (Search limited from 29-June 23)
#3931 Netduino output pin and external LED
Posted by
Flores
on 16 October 2010 - 06:42 PM
in
Netduino 2 (and Netduino 1)
See it in action with a netduino and an analog input here
#1212 Analog interrupt port
Posted by
Flores
on 24 August 2010 - 09:22 AM
in
Netduino 2 (and Netduino 1)
#805 Analog interrupt port
Posted by
Flores
on 18 August 2010 - 09:38 PM
in
Netduino 2 (and Netduino 1)
#11714 Serial to PC just wont work, What am I Doing Wrong
Posted by
Flores
on 06 April 2011 - 08:53 AM
in
Netduino 2 (and Netduino 1)
#4318 Introduction + where to buy NetDuino Plus board
Posted by
Flores
on 28 October 2010 - 01:42 PM
in
Netduino Plus 2 (and Netduino Plus 1)
#1169 Communication between 2 or more duino's
Posted by
Flores
on 23 August 2010 - 07:47 PM
in
Netduino 2 (and Netduino 1)
#1172 Communication between 2 or more duino's
Posted by
Flores
on 23 August 2010 - 07:57 PM
in
Netduino 2 (and Netduino 1)
Just use a XBee wireless. It's straight serial comm through the UART so it's easy.
Thanks but,
forgot to mention: I want it te be wired, not wireless. And I want to connect 3 or more..
#1206 Communication between 2 or more duino's
Posted by
Flores
on 24 August 2010 - 06:18 AM
in
Netduino 2 (and Netduino 1)
The I2C on the ARM7X chip is master-only. We'll see what we can do on speeding up Ethernet support...
Chris
That would be realy cool. Would even do greater distances and could use a switch for connecting them..
#411 Which components?
Posted by
Flores
on 14 August 2010 - 07:52 AM
in
Netduino 2 (and Netduino 1)
Yes. Unlike AVRs, Netduino cannot drive 20~30 mA LEDs directly. Depending on your intended usage, it may be sufficient to drive the LED with only 15 mA, it will be a bit dimmer, or you can use LEDs for smaller current (2 - 10 mA).
Please note Netduino has only three pins that can draw 16 mA (D3, D4, D7), analog pins can draw only 2 mA in digital mode, the rest of pins can draw only 8 mA.
Okay. What would be the simplest schematic and/or component to use, if I want to make sure I don't wreck my netduino connecting the outputs to stuff drawing more than those mA's?
Thanks.
#413 Which components?
Posted by
Flores
on 14 August 2010 - 08:37 AM
in
Netduino 2 (and Netduino 1)
#495 Which components?
Posted by
Flores
on 15 August 2010 - 10:12 AM
in
Netduino 2 (and Netduino 1)
Yes, any general purpose transistor like BC54x (Ic = 100 mA) or 2N4401 (Ic = 600 mA) will be fine. I often use ULN280x Darlington array (Ic = 500 mA) or serial-in/parallel-out shift register 74HC595 (20-35 mA, various derivatives) to drive multiple LEDs (matrices).
However, there are still a few other things to consider, for example 8*50 mA = 400 mA, which is close to the limit a USB port can provide (500 mA) and I think I have seen in the firmware source code that Netduino is configured at only 280 mA (have to verify this), so you may not be able to power the Netduino and LEDs from the USB port, an external power supply would be required. And, if you are driving the LEDs by PWM or multiplexing, the peak current can be significantly higher, so you'd need to account for it when selecting the components.
This is why I (annoyingly) ask for details, in my experience "connecting a LED" can mean anything from multiplexed 16*16*16 cube to 20 W RGB power LED...
Just for playing around and testing. Ordered myself a ULN2804. Thanks
#407 Which components?
Posted by
Flores
on 14 August 2010 - 06:50 AM
in
Netduino 2 (and Netduino 1)
For LEDs and the like, you should be fine as-is. If you have the chance to buy a 3.3V version of a component rather than a 5V version of the component, you'll generally want to do so.
The most important case is with communication protocols (SPI, I2C, UARTs, etc.) Many components can take either 3.3V or 5V, but some are more particular.
If in doubt, feel free to ask questions about particular parts here... There are a lot of people with electronics experience in the community.
Chris
Isn't a 5mm led using about 30mA, so too much for directly to the digital outs which can supply only 16mA?
Shouldn't we use a driver of some sort ?
#2860 Wrong network addressing breaks netduino plus
Posted by
Flores
on 25 September 2010 - 07:48 AM
in
Netduino Plus 2 (and Netduino Plus 1)
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")); } } } }
This works.. I'v got IIS running on my notebook, and i'm seeing this in my logfiles:
2010-09-25 07:39:58 192.168.5.150 4098 192.168.5.111 80 - Hallo Netduino 400 - BadRequest -
Which is expected.
However, if I change the ip address in the code above to a non existant address (like 192.168.5.10)..just to test what happens.. this totally crashes the netduino plus and VS 2010. Only way to recover is to reset the netduino with the reset button.
Am I just the wrong code? or is this a bug?
#2875 Wrong network addressing breaks netduino plus
Posted by
Flores
on 25 September 2010 - 12:46 PM
in
Netduino Plus 2 (and Netduino Plus 1)
If you try to connect to a non-existant address, it's possible that lwIP has a timeout of "infinite" and will just never stop trying
Or it's possible that there's a bug in there. .NET MF is using interop with networking, and any native code (i.e. lwIP's socket connect routines) that don't return could cause Visual Studio to wait and wait and wait... There is room to improve this--and this is great feedback to start down that path.
If I understand it right, connecting to a good address is successful--and you can easily recover by pressing the reset button on the Netduino Plus--correct? That's a good backup plan for now.
We'll look at timeout values and see what we can do to make it throw an exception quickly rather than wait forever...
Thank you very much for the feedback!
Chris
Yes, connecting to a existant address works fine. And yes, I can recover using the reset button.
I timeout would be nice, I would expect and exception.
#368 Availability
Posted by
Flores
on 13 August 2010 - 06:39 PM
in
Netduino 2 (and Netduino 1)
Hi Dallas,
Amazon should have more Netduinos in stock soon. That said, I would not hesitate to buy from MakerSHED or Proto-Advantage...they should both be able to take good care of you.
And...welcome to the Netduino community. Thanks for posting!
Chris
Good experiance with Makershed here, shipped in 1 day nicely packaged. And 'adjusted' the value for customs.
#972 Digital Pins Never Off.
Posted by
Flores
on 21 August 2010 - 01:03 PM
in
Netduino 2 (and Netduino 1)
#961 Digital Pins Never Off.
Posted by
Flores
on 21 August 2010 - 10:06 AM
in
Netduino 2 (and Netduino 1)
#959 Digital Pins Never Off.
Posted by
Flores
on 21 August 2010 - 08:54 AM
in
Netduino 2 (and Netduino 1)
#4570 Shield Request: Self-upgrade shield
Posted by
Flores
on 07 November 2010 - 08:28 AM
in
Netduino Plus 2 (and Netduino Plus 1)
#4002 USB Dual Interface
Posted by
Flores
on 19 October 2010 - 08:07 PM
in
Netduino Plus 2 (and Netduino Plus 1)
#4000 USB Dual Interface
Posted by
Flores
on 19 October 2010 - 07:59 PM
in
Netduino Plus 2 (and Netduino Plus 1)
#497 Measuring performance.. strange behaviour
Posted by
Flores
on 15 August 2010 - 10:36 AM
in
Netduino 2 (and Netduino 1)
public class Program { static bool state = false; static OutputPort led = new OutputPort(Pins.ONBOARD_LED, false); static AnalogInput input1 = new AnalogInput(Pins.GPIO_PIN_A0); static int analogValue = 0; static bool ledstate = false; static int counter = 0; public static void Main() { long start = DateTime.Now.Ticks; for (int i = 0; i < 2500; i++) { analogValue = input1.Read(); ledstate = !ledstate; counter = counter + 1; led.Write(ledstate); } long end = DateTime.Now.Ticks; TimeSpan span = new TimeSpan(end - start); Debug.Print("timespan: " +span.Milliseconds.ToString() + "ms"); } }
If I run this code, it reports that it took 37ms. But if I comment out the
counter = counter + 1part it reports that it took 979ms !! Thats strange right?
I increased the for to about 20000, then it reports it took 900ms, but the led is way longer on than a second. So it simply reports the wrong time. But why? Can't figure it out.
#513 Measuring performance.. strange behaviour
Posted by
Flores
on 15 August 2010 - 04:49 PM
in
Netduino 2 (and Netduino 1)
Is there a TimeSpan.TotalMilleseconds like there is in the full .Net Framework? If not you'll need to add all of the components of the timespan after you multiply them out to get the total.
Right. That must be it.. stupid mistake.
I was looking for the Stopwatch Class be couldn't vind it.. so wrote my own (including stupid mistakes)
Thanks
#576 LCD
Posted by
Flores
on 16 August 2010 - 08:33 AM
in
Netduino 2 (and Netduino 1)
#577 LCD
Posted by
Flores
on 16 August 2010 - 08:34 AM
in
Netduino 2 (and Netduino 1)
- Netduino Forums
- → Flores's Content
- Privacy Policy