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.

Bob Cravens's Content

There have been 17 items by Bob Cravens (Search limited from 19-April 23)


By content type

See this member's

Sort by                Order  

#2292 Netduino Interfacing with Eye-Fi SD Card

Posted by Bob Cravens on 14 September 2010 - 01:24 PM in General Discussion

There is a nice SD card with embedded WiFi called Eye-Fi (home page). It seems to operate as follows:

1. You install a service on your PC that is on your home network.
2. You configure the Eye-Fi card to connect to your network.
3. You take pictures with your camera.
4. When the Eye-Fi card is on your network, it connects to the service and transfers files.

Wow. This is very cool. I would like to repurpose this into a general data transfer system for the Netduino. Has anyone done this before?



Here is what is inside....
link



#1862 Port Arduino GPS Data Logger to Netduino

Posted by Bob Cravens on 06 September 2010 - 07:55 PM in Netduino 2 (and Netduino 1)

I was able to port this arduino project to the netduino using the 4.1.1 alpha 1 firmware. Here is a link to the details. http://blog.bobcrave...heNetduino.aspx Bob



#1810 Netduino Firmware v4.1.1 ALPHA 1

Posted by Bob Cravens on 06 September 2010 - 12:09 AM in Beta Firmware and Drivers

Yeah, I tried flushing the FileStream alone. That did not work either. It only really flushed when I flushed the StreamWriter followed by flushing the FileStream. It was like I was flushing the data through the levels: StreamWriter to FileStream and then FileStream to the disk. Bob



#1808 Netduino Firmware v4.1.1 ALPHA 1

Posted by Bob Cravens on 05 September 2010 - 11:37 PM in Beta Firmware and Drivers

Is this normal behavior?

Somewhere, I open up a FileStream and a StreamWriter
_fileStream = new FileStream(_path, FileMode.CreateNew, FileAccess.Write, FileShare.None, 512);
_writer = new StreamWriter(_fileStream);

I periodically write to the the _stream object. I found that if I just call flush on the StreamWriter nothing gets written to the file. I need to do the following:

_writer.WriteLine(rawLine);
_writer.Flush();
_fileStream.Flush();

Its like the flush does not cascade to the underlying stream. I am not certain if that is the desired behavior. It was not what I was expecting.

Bob



#1805 Netduino Firmware v4.1.1 ALPHA 1

Posted by Bob Cravens on 05 September 2010 - 09:20 PM in Beta Firmware and Drivers

I have a a 15'' MBP with 8GB RAM 2.66GHz Intel Core i7 8GB 1066MHz DDR3 SDRAM - 2x4GB 500GB Serial ATA Drive @ 7200 rpm SuperDrive 8x (DVD±R DL/DVD±RW/CD-RW) MacBook Pro 15-inch Hi-Res Glossy Widescreen Display Backlit Keyboard (English) & User's Guide I am running Parallels 5.0.9370 with Windows 7 64 bit. Bob



#1803 Netduino Firmware v4.1.1 ALPHA 1

Posted by Bob Cravens on 05 September 2010 - 09:02 PM in Beta Firmware and Drivers

I tried this alpha release on my Win7 (32 bit) netbook and everything I have tried works. The code is deployed, the debugger attaches, break points work, the .flush does work, and files are being generated. It appears that my main setup Win7 (64 bit) running in Parallels on a Mac is causing the above issues. Looks like you guys have a good reason to buy a MBP ;-) Bob



#1744 Netduino Firmware v4.1.1 ALPHA 1

Posted by Bob Cravens on 03 September 2010 - 05:12 PM in Beta Firmware and Drivers

After a bit more playing around (with out a debugger), it seems like the following are true: 1. I was not able to "append" to a file. 2. "Flushing" a stream does not seem to work. 3. After about 15-18 seconds the debugger detaches and the board appears to hang. 4. If the stream is not closed the file does not appear. I think this is normal, but without the ability to flush I am not able to get persistent data. I am trying to open a stream at the beginning of the application and use it throughout. After every write, I was calling flush. This does not appear to be possible with this alpha version. Sorry for not providing more concrete information. Bob



#1706 Netduino Firmware v4.1.1 ALPHA 1

Posted by Bob Cravens on 02 September 2010 - 10:06 PM in Beta Firmware and Drivers

Sorry for using the board like twitter. I am did find that the code is being deployed. I wrote the following:


string root = "SD_Card";
StorageDevice.MountSD(root, SPI.SPI_module.SPI1, Cpu.Pin.GPIO_Pin12);

string path = Path.Combine(root, "test.txt");
string content = "This is a test";
byte[] bytes = System.Text.Encoding.UTF8.GetBytes(content);
File.WriteAllBytes(path, bytes);



Sure enough, a file named "text.txt" with the content "This is a test" was on the SD card. It appears to me that this is only an issue with the debugger connecting to the device.

I am using the GPS Shield from the ladyada site. It has a 2GB SD card. This is looking very easy to use. Thanks!

Bob



#1704 Netduino Firmware v4.1.1 ALPHA 1

Posted by Bob Cravens on 02 September 2010 - 09:59 PM in Beta Firmware and Drivers

After further testing...the bits are not getting deployed. I added a few Debug.Print statements at the top of the code, just to check and I am not seeing those in the Output window. Bob



#1703 Netduino Firmware v4.1.1 ALPHA 1

Posted by Bob Cravens on 02 September 2010 - 09:45 PM in Beta Firmware and Drivers

Hi Chris, 1. I assume the original. Is there a way to tell? 2. I am running in a VM (parallels). 3. I was previously running the v4.1.0.2 firmware. It appears to me that the bits are being deployed. I still see the LED indicators working on the board. It looks to me like the debugger just detaches at some point. Bob



#1693 Netduino Firmware v4.1.1 ALPHA 1

Posted by Bob Cravens on 02 September 2010 - 07:13 PM in Beta Firmware and Drivers

I followed the instructions above. Then I tried to debug an existing app (one that was working before the update). The debugger starts and I can see Debug.Print lines in the Output window. Then about 10-15 seconds in it exits with the following: Incrementally deploying assemblies to device Deploying assemblies for a total size of 20872 bytes Assemblies successfully deployed to device. The debugging target and the debugger engine failed to initialize because of unspecified device errors. The debugger engine thread has terminated unexpectedly with error 'Could not reconnect to the debugging target after rebooting it.'. If you have questions, please let me know. Bob (bob.cravens at gmail.com)



#1566 Port Arduino GPS Data Logger to Netduino

Posted by Bob Cravens on 31 August 2010 - 02:44 PM in Netduino 2 (and Netduino 1)

I have put together an initial stab at creating a GPS Shield class that encapsulates the reading / parsing of the GPS data. I saw that the .NET MF supported events and multi-threading. I attempted to put the reading of the serial port into a thread of its own. The responsibility of that thread is to read data from the gps module, collect whole lines, parse the data (if necessary) and raise events. The two events are for parsed gps data and for the raw line. The raw line allows other gps sentences to be handled externally. Of course the class could be extended to include parsing other gps lines.

I found that a number of the .net framework calls that I wanted to use do not have (or don't appear to have) .net mf counter-parts. I am also feeling a bit out of my area of expertise with things like threads on the netduino hardware. I thought I would post this code to get feedback before I go much further. You will find an attached solution.

I just want some reassurance that the code is not fundamentally flawed and it seem like there is probably better ways of doing some of the things. For instance, parsing the check sum string (hex) into an integer seemed overly complex. Usually, there is a string.format("x") that works, but that did not seem to be supported.


Thanks for any comments.

Bob



In case you wander to here first....

There is a much better GPS parser here: http://forums.netdui...ated-8-26-2010/

Bob



#1533 Port Arduino GPS Data Logger to Netduino

Posted by Bob Cravens on 30 August 2010 - 09:45 PM in Netduino 2 (and Netduino 1)

I have put together an initial stab at creating a GPS Shield class that encapsulates the reading / parsing of the GPS data. I saw that the .NET MF supported events and multi-threading. I attempted to put the reading of the serial port into a thread of its own. The responsibility of that thread is to read data from the gps module, collect whole lines, parse the data (if necessary) and raise events. The two events are for parsed gps data and for the raw line. The raw line allows other gps sentences to be handled externally. Of course the class could be extended to include parsing other gps lines. I found that a number of the .net framework calls that I wanted to use do not have (or don't appear to have) .net mf counter-parts. I am also feeling a bit out of my area of expertise with things like threads on the netduino hardware. I thought I would post this code to get feedback before I go much further. You will find an attached solution. I just want some reassurance that the code is not fundamentally flawed and it seem like there is probably better ways of doing some of the things. For instance, parsing the check sum string (hex) into an integer seemed overly complex. Usually, there is a string.format("x") that works, but that did not seem to be supported. Thanks for any comments. Bob

Attached Files




#685 Port Arduino GPS Data Logger to Netduino

Posted by Bob Cravens on 17 August 2010 - 06:50 PM in Netduino 2 (and Netduino 1)

Storing a all the data seems a bit wasteful of SD memory and would limit the amount of data logging between uploads (manually or wifi). The Arduino code that I was using allowed me to see the all the GPS stream. It looks like it only logged the GPRMC message. That makes sense to me. If there is additional data that I want to parse, I can always update the parser code at a later time.



#675 Port Arduino GPS Data Logger to Netduino

Posted by Bob Cravens on 17 August 2010 - 06:02 PM in Netduino 2 (and Netduino 1)

These are great questions. I am a bit naive about what is available. I was originally wanting just lat / long points. WIth the GPRMC message I got additional info and I can see that being useful as well. I may eventually want to parse out more than the GPRMC message, but I think that is a good start.



#671 Port Arduino GPS Data Logger to Netduino

Posted by Bob Cravens on 17 August 2010 - 05:20 PM in Netduino 2 (and Netduino 1)

As Chris mentioned we had a bit of an offline discussion. Ultimately, I would like to be able to do the following: 1. Log GPS data to the SD card. 2. Roam onto open networks (using WiFi) and upload the SD data to a website. For example, I would like to install this device in my truck. Have it track the GPS points while I travel. When I pull into my garage, it will connect to my home network and post the data to the web. The data that I want is all included in the GPRMC sentence (timestamp, lat, long, speed, bearing). Bob



#636 Port Arduino GPS Data Logger to Netduino

Posted by Bob Cravens on 17 August 2010 - 04:18 AM in Netduino 2 (and Netduino 1)

I recently purchased the GPS Data Logger shield from ladyada.net and an Arduino board. The assembly and programming was straight-forward. I used the out-of-the-box solution and documented everything here: http://blog.bobcrave...heArduino.aspx. I am interested in getting this shield to work with the Netduino. Please feel free to contact me at bob dot cravens at gmail dot com. Thanks in advance for any help. Bob Cravens




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.