Main Site Documentation

WiFi + VS2013


#1

Hello there!

Been a small time since I was last here, I am hoping to build lots of small electronic devices that connect to Windows Azure (or other cloud services) through WiFi and using WebServices (or even SOAP) for communication.

The problem is, it looks like we’re stuck in the 80’s here, with Serial Ports being the major wireless technology.

So my question, I need a board that can be configured to my local WiFi, that I can program to communicate with REST services or SOAP (either is ok). I do not know how well WCF is supported in the Micro Framework, but I hope it is there.

Can you people recommend what type of hardware I need, if at all possible?
I am not particularly hung up on open source vs closed source, so premium boards / hardware are OK as a choice, provided they support the rest of the Gadgeteer sensors.

I am also curious to learn how Gadgeteer support is for VS2013. I know it took a long time before VS2012 was made available to us.

In advance, thanks for your advice.


#2

Welcome back.

Give us a little more detail about the project, and fill out your profile so we can assist you better. I think the Cobra II board with wifi is the current stateoftheart board for your needs.


#3

Thank you, I’ll have a look immediately and start prototyping.

When I register measurements from my devices, I want them to report directly to a cloud service, and not some server I have running at home. I want my worker threads up in the cloud to decide and to act upon these readings, and trigger switches, actuators, lights etc from the cloud to my home. I am thinking an SD card reader can supply the required configuration in a config file of sorts.

For this to happen,the boards need to be WiFi as well as internet-aware in that they can be configured to connect via DHCP to some WiFi, and also have the ability to use RESTful services/JSON objects OR even better; SOAP messages over TCP/IP directly to the web service that I have ready for it on the other end.

I already have a Hydra board that is not compatible with the premium devices required for WiFi- which is why I am trying to make sure I get the right products this time.

PROJECT
For my first project, I need to control two valves that are defaulted to closed, so basically, somewhere in code, I will be writing something like this:


public void OnWateringInstructionReceived(Object sender, WateringInstructionEvent e)
{
	// Calculate the number of times to fill
	var preciseTimesToFill = e.AmountToFill / MEASUREMENT_CHAMBER_CAPACITY;
	var roundedTimesToFill = (int) Math.Ceiling(preciseTimesToFill);


	for(int i = 0; i < roundedTimesToFill; i++)
	{		
		// Fill the measurement chamber
		OpenFirstValve(MEASUREMENT_CHAMBER_TIME_TO_FILL);
		CloseFirstValve();

		// Now empty it
		OpenSecondValve(MEASUREMENT_CHAMBER_TIME_TO_EMPTY);
		CloseSecondValve();
	}
}

This is just off the top of my head, I haven’t actually written this yet, as I am ordering the Cobra2 as we speak :slight_smile:

My problem:
I have no clue how to operate a valve from the cobra. What hardware do I need inbetween? What if I were to operate a servo motor, how do I do that from gadgeteer, and again, what kind of hardware needs to go between the servo motor and the Cobra2?

The valves that I’ve been looking at are these:

And the servo:
http://www.seeedstudio.com/depot/rb421-servo-2-pcs-pack-p-652.html?cPath=73

All input is appreciated!

Pedro


#4

Solenoid valves are usually controlled via a relay - so time to look at the Relay X1 module (note, do lots of research across relay modules, particularly the X16, as it has some quirks that are not necessarily simple to work around)

Servos are controlled with PWM signals. So a simple electrical connection from the PWM pin, GND and 5V power (most servos use that) will be the answer there. There are more autonomous solutions there if needed (DL40IO module might suit)


#5

Hello, WCF is supported in the Micro Framework through Device Profile for Web services (DPWS).
In the Porting Kit you can find some examples here:
C:\MicroFrameworkPK_v4_3\Product\Samples\DPWS

Unfortunately I am facing an error that I have just described here:
https://www.ghielectronics.com/community/forum/topic?id=13651

There is a low-level error that prevents the examples from properly work.
I hope that someone is able to help me and make WCF examples work.

About VS 2013, it was releases just last week. I have not tested it yet with .NET MF.
I do not think there there any any problems with MF.

BR
Karnize