O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Internet of Thing, is there a place for C# and .NET Framework?

1.295 visualizações

Publicada em

In this talk I will explore how to build software and solutions for the Internet of things using C #.

Publicada em: Tecnologia
  • Seja o primeiro a comentar

  • Seja a primeira pessoa a gostar disto

Internet of Thing, is there a place for C# and .NET Framework?

  1. 1. Internet of Things is there a place for C# and .NET Framework!?
  2. 2. who is this guy? williamsrz@outlook.com / @WilliamSRodz 28bytes.com.br / williamsrz.com.br
  3. 3. get involved http://bit.ly/MonkeyNightsDevs http://bit.ly/DotNetCuritiba http://bit.ly/MFCFCWB monobrasil.com.br
  4. 4. forget about Windows 10 and IoT devices. just for now…
  5. 5. Windows 10 IoT Core public beta in http://ms-iot.github.io/content/en-US/win10/ SupportedInterfaces.htm
  6. 6. wee want to do something besides blinking LEDs. - Jairo Cantillo
  7. 7. why C# & IoT?
  8. 8. c# runs on!?!
  9. 9. bunch of devices…
  10. 10. 2.6 billions devices
  11. 11. Mono
  12. 12. • 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
  13. 13. • 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
  14. 14. + + 2.6 billions devices
  15. 15. https://www.supergiantgames.com/games/bastion/
  16. 16. http://fezgame.com
  17. 17. http://bit.ly/mixradioapp
  18. 18. http://bit.ly/DsKids
  19. 19. http://.monobrasil.com
  20. 20. Internet of Things I wanna play too!
  21. 21. sensors / actuators gateway interact with data + + interact with the real world
  22. 22. Connect All
  23. 23. boards
  24. 24. cubieboard2 $59.00 http://cubieboard.org/
  25. 25. Beagle board BeagleBoneBlack http://beagleboard.org/black $55.00
  26. 26. if there is
  27. 27. Mono will run! http://bit.ly/IoTBoardsLinux
  28. 28. lets play
  29. 29. Camera as the Sensor C# and Raspberry Pi as Gateway, web api as interaction tool find a problem to solve
  30. 30. 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 

  31. 31. • 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?
  32. 32. • Guide https://www.raspberrypi.org/documentation/ installation/installing-images/README.md; • OS Image: https://www.raspberrypi.org/downloads/ raspbian/ install OS on Raspi
  33. 33. install Mono $ sudo apt-get update $ sudo apt-get install mono-runtime
  34. 34. 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
  35. 35. $ 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
  36. 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. 37. $ using System.IO.Ports; $ SerialPort sp = new SerialPort("/dev/ttyAMA0", 9600); $ sp.IsOpen; false $ sp.Open(); $ sp.IsOpen; true C# interactive shell
  38. 38. 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
  39. 39. 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
  40. 40. what you can do?
  41. 41. so what you can do next?
  42. 42. thank you :) williamsrz@outlook.com / @WilliamSRodz 28bytes.com.br / williamsrz.com.br
  43. 43. http://bit.ly/MonkeyNightsDevs http://bit.ly/DotNetCuritiba http://bit.ly/MFCFCWB monobrasil.com.br get involved

×