45

I'd love to start writting managed code for external devices and sensors. Are there any devices that come to mind that can be coded against using .NET? Any suggestions?

Edit: The main thing I'm trying to do is learn how device programming works. No better way to do that in my opinion than to try to do something fun and cool.

Achilles
  • 11,165
  • 9
  • 62
  • 113

15 Answers15

19

Lego Mindstorms NXT

Peter Örneholm
  • 2,838
  • 20
  • 24
14

The Netduino just came out, and it uses the .NET Micro Framework: --> http://www.netduino.com/

Jader Dias
  • 88,211
  • 155
  • 421
  • 625
Pandincus
  • 9,506
  • 9
  • 43
  • 61
  • 1
    I've had my Netduino for a little while now, and I love it. It's a lot of fun to finally get into hardware without having to learn a whole other language. – UnkwnTech Nov 01 '10 at 23:40
11

Microsoft Robotics

Coding4Fun: Blog & Developer Kit

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Walter
  • 2,540
  • 2
  • 30
  • 38
8

TinyCLR produces several different boards that support the .Net Micro Framework, the most popular being the Fez Domino:

FEZ (Freakin' Easy!) is a tiny open-source board running Microsoft .NET Micro Framework. This means, you can write code with much more efficiency using C# programming language under free Microsoft Visual C# express. Build your next projects in minutes by connecting FEZ Domino to one of the shields or the many available components. Includes USB cable.

Many libraries are already included like FAT file system, threading, USB Client, USB Host, UART, SPI, I2C, GPIO, PWM, ADC, DAC and many more.

FEZ offers many features not found in Arduino, BASIC STAMP and others:

  • Based on Microsoft''s .NET Micro Framework.
  • Runs on 72Mhz NXP ARM processors.
  • Supports runtime debugging (breakpoints, variable inspection, stepping, etc.)
  • Use Visual C# 2010 Express Edition for development.
  • Advanced capabilities like FAT, USB device and USB host.
  • Easily upgrades to hardware such as EMX.
  • Open source hardware design files.
  • Use existing shields and holder boards.
  • Based on the USBizi chipset (ideal for commercial use).
  • FEZ Mini is BS2 pin-out compatible with extra I/Os.
  • FEZ Domino is Arduino pin-out compatible with extra I/Os.
Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Jared Harley
  • 8,219
  • 4
  • 39
  • 48
6

USB Missile Launcher

Jason
  • 2,503
  • 3
  • 38
  • 46
4

Two products that make it super easy to interface with external devices are Phidgets and the Serializer. Phidgets come with an easy .NET API and includes a variety of hardware and software sensors and controllers. For a lot of cool Phidgets projects, and .NET hardware projects in general, check out the Coding4Fun Blog.

The Serializer, on the other hand, is geared toward robotics but also comes with a great .NET API. For a demonstration of the Serializer, there is a great article in Robot Magazine Issue 19 by Clint Rutkas (one of the people in charge of Coding4Fun).

TinyCLR, on the other hand, provides three different devices in their FEZ (Freakin' Easy) series that can be programmed using the .NET framework and run independent of a PC to interface with sensors and devices.

kersny
  • 2,759
  • 23
  • 15
2

You should look at the Arduino or some variant - it can interface with the USB port, and the controller itself is programmed in a C-style language.

You can then interface with (basically) any sensor/device/tool you want, and you can write code in any language that can interface with the USB.

Wayne Werner
  • 49,299
  • 29
  • 200
  • 290
  • 1
    I'd say this is the best answer to the question. You are not going to find many, if any, embedded systems that can be programmed in .NET, but you will find plenty that can interface with a host computer running .NET. – rmeador Jul 08 '10 at 20:38
  • Yeah, I think (as Peter Forss pointed out) Mindstorms NXT is pretty much "it", as far as consumer grade stuff goes that can be programmed in .NET. Never used them, and at what, $200+ USD? I think the ~$30 Arduino might be a better choice if you're on a budget. – Wayne Werner Jul 08 '10 at 21:05
2

There are lots of Home Automation APIs for .Net.

Community
  • 1
  • 1
BlueRaja - Danny Pflughoeft
  • 84,206
  • 33
  • 197
  • 283
2

The Microsoft .NET Micro Framework --> http://www.microsoft.com/netmf/default.mspx

2

I had a lot of fun programming with the OCZ NIA. It is essentially EEG that allows you to use biofeedback in your software. I wrote some code that translates your alpha and beta brainwaves into MIDI and DMX for synthesizer and lighting control. The possibilities though are endless.

It uses USB HID which many devices use, so it was a good introduction. There is a handful of code over at http://code.google.com/p/nia-brew/, and you'll find the OCZ NIA forums very helpful in getting started.

Brad
  • 159,648
  • 54
  • 349
  • 530
  • 1
    Not officially, but the code to the right of that page I sent you has all the code needed to get started. Specifically, NiaSharpReader has C# source you can use as a great jumping off point. – Brad Jul 09 '10 at 13:27
1

Tinkerforge

I didn't try this yet, but I'd like to do some more hardware programming and I'm thinking about using Tinkerforge.

Short introduction from the Wikipedia page (emphasis by me):

Tinkerforge is a platform of stackable microcontroller building blocks (Bricks) that can control different modules (Bricklets). The primary communication interface of the building blocks can be extended using Master Extensions. The hardware can be controlled by external programs written in C, C++, C#, Object Pascal, Java, PHP, Python, Ruby and VB.NET over a USB or Wifi connection, and running on Windows, Linux and Mac OS X. This non-embedded programming approach eliminates the typical requirements and limitations (development tools, limited availability of RAM and processing power) of conventional embedded software development (cfr Arduino). Tinkerforge hardware and software are both Open Source, and all files are hosted on GitHub.

As far as I understand, this is more high-level than, let's say, the Arduino.
I can probably learn more about actual hardware programming from using Arduino, but I don't want/need deep knowledge about low-level hardware programming - I just want to create something cool with hardware.

Christian Specht
  • 35,843
  • 15
  • 128
  • 182
1

The list will be huge, I don't see any reason why a device could not be controlled by .NET. In a last resort solution using DllImport and direct IoControl calls to the device drivers will (assumed you know the interfaces) work well.

jdehaan
  • 19,700
  • 6
  • 57
  • 97
  • This is true: I've written an entire industrial control system (a system using motors, robots, sensors, cameras, valves) using C# and the System.IO.Ports.SerialPort class. – codekaizen Jul 08 '10 at 21:18
0

There is already another answer mentioning an USB Missile Launcher...however, the code linked there is over six years old and I couldn't get it to work with my model.

So I wrote my own library (in .NET 4.0): MissileSharp
For anyone interested, the complete source code is here.

This was my first try ever to write code for a hardware device.
For learning purposes, I looked at the code of the project linked in the other answer, and at the code of the "official" control software that you can download from the vendor's site (direct link - the source code is not directly available, but the software is written in .NET, so you can look at the code with Reflector, ILSpy or a similar tool).
I used HidLibrary to send the actual commands to the device.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Christian Specht
  • 35,843
  • 15
  • 128
  • 182
-1

Arduino is one of the better ones out there I think.

Arunabh Das
  • 13,212
  • 21
  • 86
  • 109
-1

I know you said .Net, but the Arduino is a fun device to play around with. http://www.arduino.cc/

Amir Aliabadi
  • 181
  • 1
  • 4