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.
Photo

Windows Form XBee and LCD display


  • Please log in to reply
5 replies to this topic

#1 willgeorge

willgeorge

    Member

  • Members
  • PipPip
  • 25 posts

Posted 20 September 2011 - 03:35 PM

JH.CommBase is Copyright © 2011, Synapse Solutions Group. I am using so I should mention it!
The idea for this application came from: Search for NETMF_Return_of_Massage_Chair.pdf.

JH.CommBase is serial code by Synapse Solutions Group. I have modified the original code slightly for my needs/wants. The original code I found at this link http://forums.netdui...no-xbee-sample/. A link to the JH.CommBase used in the windows form is provided in the form notes.

There is no copyright on my part of the code (excluding JH.CommBase). Use however you want and have fun....

The master X-Bee for my PC is using USB COM4. Master and Remote X-Bee communicate on RF COM1. The XBee's communicate a default 9600 baud. I saw no reason for more speed. X-Bee remote uses a Sparkfun XBee Explorer Regulated for the Netduino. The master X-Bee uses a Sparkfun XBee Explorer USB to connect to my PC. The windows form will allow you to select your PC COM port.

I am providing a windows form that communicates with a driver for the netduino. I removed all of the binary for the form/driver and have not include the original source for the JH.CommBase(s) so you must complie the code (due to download size of the complete source). I used C# express 10. I have tested and all seems well at my end. The LCD is a Sparkfun 2X16 serial LCD-09067 3.3 volt.

I messed up! I attached a zip with a windows form without the LCD support! But then again I'm 70 years old and I'm lucky I can type this post!

Have Fun...

Attached Files



#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 20 September 2011 - 03:36 PM

Thanks, willgeorge. Do you have a photo or short video of your code in action? Chris

#3 willgeorge

willgeorge

    Member

  • Members
  • PipPip
  • 25 posts

Posted 20 September 2011 - 04:09 PM

Thanks, willgeorge. Do you have a photo or short video of your code in action?

Chris



Chris

No I do not. Sorry. My grandchildren have all of my video equipment. Even my webcam.

And please note that the original zip file was for a older version. Frankly.. I messed up. I have replaced the zip with LCD support code. The first zip was without LCD support.

Maybe a screen shot?

#4 Moskus

Moskus

    Advanced Member

  • Members
  • PipPipPip
  • 132 posts
  • LocationNorway

Posted 20 September 2011 - 05:43 PM

Wow, great! :) Is it also possible for the PC to measure the signal strength of the Xbee connected to the Netduino?

#5 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 20 September 2011 - 06:46 PM

Maybe a screen shot?

That would be great! Anything that helps explain your project and lets Netduino makers understand how they can use your contribution is helpful.

Chris

#6 willgeorge

willgeorge

    Member

  • Members
  • PipPip
  • 25 posts

Posted 22 September 2011 - 10:40 AM

That would be great! Anything that helps explain your project and lets Netduino makers understand how they can use your contribution is helpful.

Chris


Sorry for the delay in responding.Very busy the past few days.

You asked about 'Is it possible for the PC to measure the signal strength of the Xbee connected to the Netduino?'. I never thought of that but I found a link that suggests a way to do it. http://log.liminastu...om-the-rssi-pin. I think I will look into it.

As to explaining my project.

It started when I found the following at Microsoft. NETMF_Return_of_Massage_Chair.pdf http://www.microsoft...s.aspx?id=11666. I find the standard NETMF emulator a bit limiting so I thought of using a windows form to do the job. My project implementsthe signals used to operate the virtual massage chair (a basic motor control circuit).

Then I thought that it would be nice to receive feedback on each operation the Netduino was doing. I had two XBee's so I used them for the communication process between the windows form (PC serial port) and the Netduino serial port. As usual, all of my projects seem to grow and grow. Then I remember I had a serial LCD... So I included that at the Netduino for visual feedback and added code to use some of it's features. All seems to work reasonably well so I thought I would share my ideas (code). I'm a electronics guy. I am NOT a expert programmer, but I somehow seem to get things working. In my code I use a command structure that allows up to 100 basic (command string) and up to 100 extended commands (command string, data string). You would need to change the code for the form and at the Netduino to change/add commands (how many and what they do) but it is a start for the basic flow of operations.

In the pictures I attach you will see a bunch of CheckBox controls that do nothing useful at the moment. I plan to extend the code so as to define ports at the form and Netduino as input/output, used/not used etc. by use of the checkboxes. Just a thought at the moment because I have no idea how much code can be jammed into the Netduino. I guess I will just keep adding things untill I get some 'error'. I use strings at the moment for commands and assume they take up alot of memory at the Netduino. I use strings now because it was my first thought. Not because I should. Maybe store and read from the MicroSD on a Netduino-Plus?

If you use C# I would assume my code would be at least useful as an "experiment for improvement".

Have a great day!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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.