13. • Open source implementation of the CLR
• Linux, MacOS X, Solaris, BSD, Wii, PS3…
• Started in 2001 as Ximian, purchased by Novell in
2003, released in 2004;
Mono
14. • 2009, Mono.Touch created (released in 2010);
• 2010: Mono.Droid created (release in 2011);
• 2011: Novel purchased by Attachmate where entire
Mono team has ben sacked.
• 2011: Xamarin Startup created.
Mono
30. Camera as the Sensor
C# and Raspberry Pi as Gateway,
web api as interaction tool
find a problem to solve
31. http://bit.ly/Raspi2ModelB
• A 900MHz quad-core ARM Cortex-A7
CPU
• 1GB RAM
• 4 USB ports
• 40 GPIO pins
• Full HDMI port
• Ethernet port
• Combined 3.5mm audio jack and
composite video
• Camera interface (CSI)
• Display interface (DSI)
• Micro SD card slot
• VideoCore IV 3D graphics core
R$ 24990
32. • 1 Raspberry Pi or a Raspberry Pi 2;
• 8GB “hard disk drive”;
• Ethernet cable or wifi dongle;
• Computer with SD card reader;
• Optionally: USB mouse and keyboard, HDMI
screen;
what you need for start?
35. using System;
namespace Test
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Running on {0}", Environment.OSVersion);
Console.WriteLine("Press a key to continue");
Console.ReadKey(true);
}
}
}
$ mcs Test.cs
$ mono Test.exe
testing and running
36. $ sudo apt-get update
$ sudo apt-get install mono-csharp-shell
$ csharp
Mono C# Shell, type "help;" for help
Enter statements below.
$ LoadAssembly("Raspberry.IO.GeneralPurpose");
$ using Raspberry.IO.GeneralPurpose;
$ var gpioConnection = new GpioConnection();
$ quit;
C# interactive shell
37. $ sudo apt-get update
$ sudo apt-get install mono-csharp-shell
$ csharp
Mono C# Shell, type "help;" for help
Enter statements below.
$ LoadAssembly("Raspberry.IO.GeneralPurpose");
$ using Raspberry.IO.GeneralPurpose;
$ var gpioConnection = new GpioConnection();
$ quit;
C# interactive shell
39. var cameras = Cameras.DeclareDevice()
.Named(“Camera")
.WithDevicePath("/dev/video0")
.Memorize();
var pictureSize = new PictureSize(640, 480);
cameras.Get(“Camera1")
.SavePicture(pictureSize,”imagem.jpg", 20);
take a picture
40. var req = WebRequest.Create(“your_service_url”);
req.Method = "PUT";
//req.Headers.Add(“key”, “value");
var fileStream = new FileStream(@“app_dir/imagem.jpg”,
FileMode.Open);
push to a service