Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Internet of Things: Programming on the edge

240 views

Published on

Learn about the Internet of Things and edge computing. This talk will provide an overview of IoT system architecture, the edge device landscape, and an introduction to RxFusion, the open-source C++ framework for programming edge devices. The presentation includes live demonstrations of example code.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Internet of Things: Programming on the edge

  1. 1. Internet of Things: Programming on the edge … in RxFusion
  2. 2. Agenda  IoT Edge Computing  Embedded Device Landscape  Programming Model  IoT Components  Hello MQTT  Udoo Demo  Links
  3. 3. IoT Edge Computing
  4. 4. IoT Edge Devices CPU FPGA MCU SoC ASSP Linux Windows RTOS Bare Metal ARM x86 AVR
  5. 5. RxFusion Programming Model
  6. 6. Framework Components Inputs Outputs Operators Connectors
  7. 7. Compression
  8. 8. Summarization
  9. 9. Hello MQTT #include <WiFi101.h> #include <RTCZero.h> #include <RxFusion.h> WiFiClient client; MqttPub broker(client,"broker.hivemq.com",1883,"vtcc8/rxfusion/test","vtcc8"); AnalogIn<int> sensor(A1); void app() { ConnectWifi("your-wifi-ssid", "your-wifi-password"); sensor >> AverageOver<int>(1000) >> Dedup<int>(30000) >> Format<int>("{"sensor":$1}") >> broker; }
  10. 10. Udoo Demo M4 A9 ARM ARM Browser Freescale i.Mx 6SoloX SoC
  11. 11. Udoo - MCU #include <RxFusion.h> Range<int> ramp(-200,200,5); AnalogIn<int> ambient(A0); AnalogOut<int> led(6); Cpu<int> cpu; void app() { ramp >> Iterate<int>(100,true) >> Abs<int>() >> led; ambient >> Poll<int>(250) >> cpu; }
  12. 12. Udoo - CPU var http = require('http'); var rx = require('rxfusion'); http.listen(8090, function(){ var mcu = new Mcu(); var browser = new SocketIO(io, 'hist'); // Average 5 samples at a time with sliding window of data to socket.io clients rx()(mcu >> AverageOf(5) >> Window(16,true) >> browser); });
  13. 13. Udoo - Web Page <script> var chart = c3.generate({ data: { columns: [], type: 'spline' } }); var socket = io(); socket.on('hist', function(data) { chart.load({ columns: [ Array.concat('ambient', data) ] }); socket.emit('ack', 'ok'); }); </script>
  14. 14. Links  Twitter @GreenMtnComp  Source github.com/sathibault/RxFusion  Documentation readthedocs.com/project/rxfusion
  15. 15. Pedometer // Extract x-axis and calculate a moving average with a window of 4. auto smooth = accelerometer >> Project1<xyz>() >> WinAverage<short,4>(); // Produce tuples of original value, min and max over a window of 8. auto box = smooth & (smooth >> WinMin<short,8>()) & (smooth >> WinMax<short,8>()); // Custom function using C++ 2011 anonymous function uses the original // value with the min/max to detect rising and falling edges. auto edges = box >> Map<xyz,int>([](xyz& vec) -> int { int pos = (vec._1 - vec._2) > 30; int neg = (vec._3 - vec._1) > 30; return pos - neg; })

×