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.

dab's Content

There have been 54 items by dab (Search limited from 29-March 23)


By content type

See this member's


Sort by                Order  

#4193 What is the Netduino Mini?

Posted by dab on 24 October 2010 - 11:45 PM in Netduino Mini

That is pretty cool. Small and cheap enough to install in a dedicated project B). This definitely gives me some ideas. Watch out ;)



#3384 UART Shield

Posted by dab on 02 October 2010 - 04:22 AM in Project Showcase

I use one of the FTDI USB cables that has the FT232R built in.

Works great with the Netduino (make sure to get the 3V3 version).



#3292 Serial Comms via USB in the cards?

Posted by dab on 30 September 2010 - 05:26 PM in Netduino 2 (and Netduino 1)

We are working on a USB HID (driverless) communication channel...and are looking at CDC as well. We're not sure if we'll be able to enable CDC _and_ USB debugging at the same time--but we're looking at it.

Pardon my ignorance, but what's CDC (besides the Centers for Disease Control ;))?



#3263 SD huh?

Posted by dab on 30 September 2010 - 06:11 AM in Netduino Plus 2 (and Netduino Plus 1)

On second thought...

fileLocation += fStream.Read(buffer, fileLocation, System.Math.Min(128, (int)(fInfo.Length - fileLocation)));

fileLocation is 128 on your second loop--too high of an offset in your 128-byte buffer array. Did you want to pass 0 as your second parameter?

Chris

Also, it looks like you can just use 128 for the 3rd parameter to FileStream.Read()...if it reads less than 128 bytes, then it should be OK (the method will return the actual number of bytes it read).



#3261 How to use the SD card and StreamWriter

Posted by dab on 30 September 2010 - 06:01 AM in Netduino Plus 2 (and Netduino Plus 1)

We have posted updated firmware to address the SD card mounting and memory allocation issues.
http://forums.netdui...patch-4-beta-1/

SD card-related updates in the firmware update:
* Mounting invalid MicroSD cards now throws an exception
* Reduced memory usage when accessing SD cards

Please let me know if this new firmware fixes things for you...

Chris

Cool - thanks for getting the new firmware out so quickly!

This seems to fix the problem I was having with the StreamReader.ReadLine() method yesterday:
Current directory: \
dir: \SD
file: \SD\FOO.TXT
The quick brown fox jumps over the lazy dog.

Now I need to figure out what to do with 1.83 GB of storage. B)



#3237 Console Output??

Posted by dab on 30 September 2010 - 02:03 AM in General Discussion

You can also view the Debug.Print statements through MFDeploy. If you're not running the app from Visual Studio, press F5 in MFDeploy to hook into the Netduino's Debug output.

Chris

Oh, cool - I didn't know that. Thanks for the tip!



#3236 Power Questions - i.e. Voltage

Posted by dab on 30 September 2010 - 01:59 AM in General Discussion

ummmm didnt think about that.... I dont really know. I guess what I'm asking is what can I do to get a battery with high amps and at least 9V... cuz they sell them for RC model airplanes, but those are crazy expensive

Well, you could put two of the 6V batteries in series to get 12V.

With a regulator, it's fairly easy to *decrease* the voltage. But, in general, it's not easy to increase the voltage of a DC source.

Increasing the voltage generally involves converting DC to AC (or a DC square wave), passing it through a step-up transformer, and converting back to DC.

But if you do that, then the current will decrease proportionally with the voltage increase (actually, you'll lose even more current due to losses in the transformer, etc.).



#3209 Console Output??

Posted by dab on 29 September 2010 - 09:14 PM in General Discussion

Hi Shane and welcome!

The Debug.Print will appear in the Output window within Visual Studio or Express.

Cheers,
Matt.


And you need to have the debugger attached. In VS2010, go to Debug | Start Debugging, which will run the solution in the debugger.

If the debugger isn't attached, the Debug.Print() statements will have no effect.



#3184 Stay close to your computer (or come to MakerFaire)...

Posted by dab on 29 September 2010 - 07:23 AM in General Discussion

Would you be interested in helping implement (Micro)SDHC libraries using SPI?

Sure.

Helping lead the team?

Uuhm, depends on what you mean by "team". ;)



#3180 Introducing Netduino Plus -- Notes

Posted by dab on 29 September 2010 - 06:58 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?

I bought this one today, and it seems to work (well, I can read the directories and file names, but there seems to be a problem with reading file contents).

SanDisk Mobile microSD Card 2GB

$9.99 at Office Depot in the US.



#3178 How to use the SD card and StreamWriter

Posted by dab on 29 September 2010 - 06:48 AM in Netduino Plus 2 (and Netduino Plus 1)

Chris,
Thanks for looking into this. If you change to use ReadToEnd() the behavior is the same. So this might be memory leak inside the StreamReader itself.

I'm getting exactly the same error as Szymon when I try to read a file from the SD card. I actually wrote my sample before I saw this thread, but my code is almost the same. ;)

Here's the sample code where I use a StreamReader object to get the first line of a text file:

using System;
using System.IO;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;

namespace SDCardSample
{
    public class Program
    {
        public static void Main()
        {
            string currentDir = Directory.GetCurrentDirectory();
            Debug.Print("Current directory: " + currentDir);

            string[] dirs = Directory.GetDirectories(currentDir);
            foreach (string d in dirs)
            {
                Debug.Print("dir: " + d);
                string[] files = Directory.GetFiles(d);
                foreach (string f in files)
                {
                    Debug.Print("file: " + f);
                    StreamReader reader = new StreamReader(f);
                    Debug.Print(reader.ReadLine());
                    reader.Close();
                }
            }
        }
    }
}

And the exception that gets thrown:

Current directory: \
dir: \SD
file: \SD\FOO.TXT
Failed allocation for 685 blocks, 8220 bytes

Failed allocation for 685 blocks, 8220 bytes

    #### Exception System.OutOfMemoryException - CLR_E_OUT_OF_MEMORY (1) ####
    #### Message: 
    #### System.IO.StreamReader::ReadLine [IP: 000a] ####
    #### SDCardSample.Program::Main [IP: 005e] ####
A first chance exception of type 'System.OutOfMemoryException' occurred in System.IO.dll
An unhandled exception of type 'System.OutOfMemoryException' occurred in System.IO.dll

Note that this happens for both ANSI and UTF-8 encoded files (I created the files on the PC).



#3131 Stay close to your computer (or come to MakerFaire)...

Posted by dab on 28 September 2010 - 06:32 PM in General Discussion

klotz,

A bit of both. But mostly a software limitation. If there's interest, we can start a community project to expand this to 4GB or beyond (for MicroSD cards that support SPI).

Chris


As a member of the community, I'd be interested in the project to expand the microSD capacity...



#3129 Buying or Acquiring Parts

Posted by dab on 28 September 2010 - 06:24 PM in General Discussion

This is a timely topic ;). It would nice to make this a sticky thread for future reference (and a place to point somebody to when they ask where to find things).

I'll add a couple more:

  • Evil Mad Science Shop: This is the companion store for the Evil Mad Scientist Laboratories blog. A smaller but more eclectic shop. They mainly sell kits of their own design, and also have some good deals on components (like RGB LEDs). Also check out the EggBot.
  • Adafruit Industries: The companion store for the LadyAda.net blog (aka Limor Fried). Like Evil Mad Science, the store carries a lot of kits designed by LadyAda, as well as lots of Arduino boards and shields. There's some overlap with MakerShed and SparkFun, but a lot of cool stuff.



#2702 Out of memory error

Posted by dab on 23 September 2010 - 10:45 PM in Netduino 2 (and Netduino 1)

I think we'd need to see the rest of the code in order to find the problem. Can you post the complete source code?



#2653 Stay close to your computer (or come to MakerFaire)...

Posted by dab on 23 September 2010 - 05:55 AM in General Discussion

Removing the rest of the evidence ;)



#2651 What is need to get started with Netduino?

Posted by dab on 23 September 2010 - 05:44 AM in General Discussion

Thanks David for the reference to the Make: Electronics book. Exactly what I'm after!! (now to find someone in Australia that sells them!)....

You can also get the eBook version for US $27.99.



#2644 What is need to get started with Netduino?

Posted by dab on 23 September 2010 - 04:05 AM in General Discussion

You'll probably need three resistors--one for each of the Red, Green, and Blue elements.

Chris


1K is probably too high a resistance if you're driving LEDs from the Netduino output pins (3.3v).

Something like 100 ohms is probably more appropriate for Red or Green LEDs. I think Blue LEDs generally have a higher forward voltage, so you may need an even smaller resistor (or maybe no resistor at all). Best bet is to buy a resistor assortment, and save yourself some frustration.

Also, you'll probably want a potentiometer to attach that knob to ;).

If you're just getting started in electronics, I'd highly recommend the Make: Electronics book. It's a great hands-on introduction to basic electronics. It doesn't cover Arduino/Netduino specifically, but it's a good learning guide.



#2643 Stay close to your computer (or come to MakerFaire)...

Posted by dab on 23 September 2010 - 03:51 AM in General Discussion

I quite like flying things. Will it be a flying rug? Only time will tell ;)


Flying rugs are so old world. I vote for flying cars ;)



#2642 Stay close to your computer (or come to MakerFaire)...

Posted by dab on 23 September 2010 - 03:48 AM in General Discussion

Sorry, I'm voluntarily deleting my previous remark, since it was somewhat inappropriate. I don't mean to detract from the Secret Labs announcement.



#2602 Controlling a LED Intensity

Posted by dab on 22 September 2010 - 05:27 AM in General Discussion

And if you have any questions about the PwmSample, please feel free to post them here or in the Project Showcase forum (I posted the sample code). Let us know when you get the Cylon / Knight Rider circuit working (and share the code if you don't mind). ;)



#2601 PwmSample

Posted by dab on 22 September 2010 - 05:15 AM in Project Showcase

Oooooooooooooo... button-controlled fading. Pretty!

Now to get my head around the code and get it doing something useful.

dab, thanks for publishing useful example. How do you suggest I get a relevant basic command reference? I hate reading (and writing) documentation as much as the next guy but there are times when it really helps...

The community (including me ;) ) would probably benefit enormously from some pointers on how to research the command syntax.


Hi FastEddy,

Thanks for the kind words - I'm glad you find the sample code helpful B).

You raise a good point about getting up to speed on the technology. I consider myself pretty much a newbie to C# and the .NET framework (until relatively recently, I was a C++/Win32 API kind of guy).

For me, the biggest challenge is the .NET framework itself. It's huge (even .NETMF), and a lot of classes aren't very discoverable. I always find myself thinking "I know there's a class/method to do 'x', but where?".

Here are some things I've found helpful:

  • Sample code. Find something here in the Project showcase that looks interesting to you, get the source code, and play with it. Look up the classes / methods that you're not familiar with. Try making small changes to the code and see what happens. Don't be afraid to experiment.
  • Online documentation. Currently, the best available documentation is at the MSDN library site. But be aware that even that is sometimes wrong, or slightly out-of-date for the .NETMF libraries.
  • Books. There are a couple of books that I've found sort of useful. One is "Embedded Programming with the .NET Micro Framework", by Donald Thompson and Rob Miles. The other is "Expert .NET Micro Framework" by Jens Kuhner. Both of these are a bit dated, but have some useful sample code. There's also quite a bit of stuff in both books that I didn't find that useful, but they're worth reading for a couple of chapters (I'd recommend borrowing them if you can find a library that has them, or buy used copies).
  • Community. Right here is a good resource - it's a fairly small (but growing) community, and people I've seen are eager to share and swap advice and ideas. And the Secret Labs folks here are also super-helpful.

I hope that helps get you started.



#1415 Schematic capture software?

Posted by dab on 27 August 2010 - 03:19 PM in General Discussion

Did you look at Fritzing? It's what I use to document schematics for my projects.
And CW2 already created Fritzing part for Netduino.

Thanks, Szymon. I'll take a look at Fritzing - it looks interesting.



#1404 Electronics Books

Posted by dab on 27 August 2010 - 06:16 AM in General Discussion

I'm in the same boat. This book has been fan-freakin-tastic: Make: Electronics

Stacy

+1 on Make: Electronics. Very fun and easy read, with clear explanations and experiments that demonstrate the principles well.

Some of the old Radio Shack books by Forest M. Mims are also quite good. I believe you can still get his classic "Getting Started in Electronics", as well as reprints that combine several of the small "Engineer's Mini Notebook" titles in one book.



#1403 Soldering Temperature for IC's, etc...

Posted by dab on 27 August 2010 - 06:07 AM in General Discussion

I'd say it also depends a lot on the type of solder you're using. I learned to solder back when Pb/Sn solder wasn't considered hazardous :o, so my soldering habits have developed around that. I've found that about 350C works well for eutectic (63% Sn, 37% Pb) solder. I just recently started using lead-free solder, and found that I had to kick the temperature up to nearly 400C to get it to melt in a reasonable amount of time, and for it to wet/flow well. Maybe I just haven't gotten used to it yet, but I find the lead-free stuff harder to work with, and the joints never look nice and shiny like Pb/Sn. Instead, the joints have that slightly dull finish, which always makes me worry that I've got a cold solder joint. :angry:



#1401 Schematic capture software?

Posted by dab on 27 August 2010 - 05:57 AM in General Discussion

Hi folks,

Some the little sample projects that I've been sharing over on the Project Showcase are getting large enough that it would be helpful to post a schematic along with the code. I expect the circuits will only get bigger as time goes on. ;)

I've been out of the electronics hobby for a while, so I'm curious what kind of schematic capture software is hobbyist-friendly. Basically, this means free (or cheap), and easy to learn.

It looks like Eagle supports schematic capture as well as PCB layout, and has a limited freeware version.

I've also heard some recommendations for KiCad (open-source).

Are there any others I should look into? I'm on the Windows platform, BTW.




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.