Newbie: Cobra III Ethernet Question

Hi Gang, Merry Christmas to all. I have decided to take the plunge and give .net a try on the micro scale. I have used Picaxes, Pi’s, and now I’d like to try using C and .net (instead of VB), having used VB/Visual Studio since version 1. I am not a serious programmer, but manage to play around in my off hours.

My project is to run and document a water system I have here at my house, I have a low capacity deep well (brackish), Reverse Osmosis treatment, storage tanks (along with a separate rainwater collection system), which runs on mechanical floats etc, but I have well level and tank level sensors (4-20ma sensors), little hall effect flow sensors. so I can track my domestic and irrigation water usage.

I had originally programmed a 40x2 Picaxe (PIC Micro) with “Basic”, it was about 3,000 lines of code by the time it was all done, but never finished the project, as my day job interfered with things.

So now I would like to try this using c# on .net. So I’ll have to learn the language, and the .net microframework parts. I have ordered a FEZ Cobra 3 with a 4.3 inch NHVN touch display. I also have a couple of netduino’s (3 ethernet and Go!) that I bought as well, but notice that there is effectively no support for this hardware, or so it appears based on the last few months on non-activity on their forums.

So my setup will be something like this: One micro sitting in the water processing building (connected to the house through a CAT5 cable, could use it for serial comms as well) doing the heavy lifting, and a second micro in the house with a nice display that will give ‘at a glance’ readings of well water levels, both tank water levels, and water consumption over the last day and week. (Something like that). I also have a salinity monitor that puts out 4-20ma, so I will probably monitor that as well. I experimented initially with hosting the data up on a website, and did some python programming on a Pi to do this, but the project got a little too, let me say, large?

So I’d like to maybe try this with a couple of the cobra boards, and maybe just store the data in an sd card on the cobra.

My first question, I am not sure how I add Ethernet connectivity to the cobra, it’s not a gadgeteer board, so I’m not sure which ethernet module will work with the thing, I will have the LCD connected as well through the GX? Interface whatever it’s called. Cheers! John

1 Like

You can use the GXP gadgeteer board which will give you sockets for a display and spi socket to connect Ethernet or WiFi modules.

Though can also use a cheap ENC28 module from eBay and write it to the cobra headers. First option is better of course.

Welcome to the community.

Take a look at the image on this page showing the cobra

The S socket on the Gadgeteer GXP Bridge board Gus mentions can take the ENC28 Ethernet module.

Thanks Gus and gang, parts are on their way. Happy New Years!

1 Like

What about just buying an USB to ethernet adapter and plugging that into the host USB port?

Welcome Derrick to the forum

That would work if you have a full driver for the Ethernet adapter, which is a non-trivial effort. So it’s not something that’s worth looking at. The chips have ENC28 capability that’s trivial to connect and is then able to be used with standard firmware and drivers, so it’s not worth contemplating something harder.

So if I buy the GXP Gadgeteer Extender for the FEZ Cobra 3 and the ENC28 module, what C# libraries do I use so that I can talk to a Raspberry Pi 2 connected to the FEZ Cobra 3 via ethernet? Can I just use System.NET included with FEZ Cobra 3?

you’re just going to have two network devices, and you can talk between them however you decide. The networking support page has some starter points for you, and there’s a number of projects in the codeshare that has client and server components.