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.

Lecture 3 - Software for the Internet of Things

1,172 views

Published on

A description of Wyliodrin STUDIO and Node Red (Streams)

Published in: Engineering
  • Be the first to comment

  • Be the first to like this

Lecture 3 - Software for the Internet of Things

  1. 1. Software for the Internet of Things
  2. 2. Outline Wyliodrin Wyliodrin Library Overview What language should I use? Visual Programming Streams Programming Signal Processing Questions 2
  3. 3. Wyliodrin 3 www.wyliodrin.com
  4. 4. Chrome App 4
  5. 5. Dashboard 5
  6. 6. Open Source Library 6 Arduino API ◦ C/C++ ◦ Python ◦ Javascript Visual Programming Streams programming Hardware Independent API
  7. 7. Languages Python Javascript Shell Arduino 7
  8. 8. Wyliodrin Library 8 www.wyliodrin.com
  9. 9. Similar to Arduino Library pinMode (pin, mode) ◦ INPUT or OUTPUT digitalWrite (pin, value) digitalRead(pin) ◦ HIGH (1) or LOW (0) analogWrite (pin, value) - PWM ◦ 0 – 255 analogRead (pin) ◦ 0 – 1023 9
  10. 10. What Language Should I use? 10 www.wyliodrin.com
  11. 11. Visual Programming 11
  12. 12. Prototyping Drag and drop blocks Writes code in Python or Javascript Good for documentation 12
  13. 13. Python 13
  14. 14. Streams Programming 14
  15. 15. Data Driven Programming Event based Data determines actions The program is a graph Elements ◦ Nodes ◦ Data routes 15
  16. 16. Messages Nodes send messages to each other ◦ An input ◦ Multiple outputs When a message arrives in the input ◦ Node activates ◦ Might send out some messages Example 16
  17. 17. Messages Javascript objects Nodes expect to receive payload { topic: payload: … } 17
  18. 18. Nodes Run Digital and analog pins access Trigger Delay Value Buffer Switch Change Range Function Visual Subflows Signals Messages Print Web request Web server 18
  19. 19. Run Sends a message at a certain interval Payload: ◦ Timestamp ◦ Blank ◦ String ◦ # number of message 19
  20. 20. Print Prints to the screen ◦ Only payload ◦ Whole messages ◦ Some field May be stopped with the button 20
  21. 21. Digital and analog pins access Digital write ◦ Writes HIGH(1) or LOW (0) when it receives a message ◦ The value written is the payload 21
  22. 22. Digital and analog pins access Analog write ◦ Writes PWM when it receives a message ◦ The value written is the payload 22
  23. 23. Digital and analog pins access Digital read ◦ Reads HIGH(1) or LOW (0) when it receives a message ◦ The value read is sent in the payload 23
  24. 24. Digital and analog pins access Analog read ◦ Reads an analog value when it receives a message ◦ The value read is sent in the payload 24
  25. 25. Trigger When it receives a message ◦ Sends a message with Output as payload ◦ Waits for some time ◦ Sends the second Output as a payload 25
  26. 26. Delay Delay ◦ Sends the received message with a delay Limit ◦ Limits the number of messages that it sends ◦ Drops or storas messages 26
  27. 27. Value Value ◦ Stores the payload ◦ context.global._value_name_ 27
  28. 28. Buffer When it receives a messages ◦ Adds the payload and other properties to an array ◦ It sends the array when ◦ The buffer is full ◦ Receives an event 28
  29. 29. Switch When it receives a messages ◦ Checks some rules ◦ Send the message using the rule’s output ◦ Values may be used ◦ {{value}} 29
  30. 30. Change Modifies the properties of a message 30
  31. 31. Range Scales the payload 31
  32. 32. Function Javascript function ◦ msg the message received ◦ context.global values stored with the value node ◦ return sends the message May have multiple outputs ◦ return [o1, o2, o3] 32
  33. 33. Visual Visual Programming Function 33
  34. 34. Subflows Subflows 34
  35. 35. Send signal Sends a signal ◦ To the dashboard ◦ To another board 35
  36. 36. Receive signal Receives a signal ◦ Sends a message with the signal received ◦ Payload is the value ◦ Topic is the name ◦ Sender ◦ User id if it comes from the dashboard ◦ Board id if it comes from a board 36
  37. 37. Questions? 37

×