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.

Raspberry Pi IoT Stacks

118 views

Published on

Interactive Light controlled through WIFI / BLE with Raspberry PI, Node.js and React-Native

Published in: Engineering
  • Be the first to comment

  • Be the first to like this

Raspberry Pi IoT Stacks

  1. 1. Raspberry Pi Node.js React-Native Interactive Light Controlled through WIFI / BLE
  2. 2. fullstack FRONTEND DEVELOPER who "will do whatever the fucking job requires”
  3. 3. int buttonPin = 3; // setup initializes serial and the button pin void setup() { beginSerial(9600); pinMode(buttonPin, INPUT); } // loop checks the button pin each time, // and will send serial if it is pressed void loop() { if (digitalRead(buttonPin) == HIGH) serialWrite('H'); else serialWrite('L'); delay(1000); } MCU (CPU + Memory) C++ with Processing Time-sharing coding Simple to start, easy to learn No complex package dependencies Cheap and low energy Digital/Analog IO WIFI, BLE not included
  4. 4. INPUT DO SOMETHING OUTPUT INITIATE WHILE (1)
  5. 5. BUT
  6. 6. INPUT DO SOMETHING OUTPUT INPUT DO SOMETHING OUTPUT INPUT DO SOMETHING OUTPUT
  7. 7. Raspberry pi 3 = RPi b + WIFI + BLE
  8. 8. PROS Node.js / Python Built-in WIFI, BLE support A bit expensive but still affordable GPIO It’s linux CONS 3.3V out Complex setup (wifi, ssh …) Not cheap It’s linux man
  9. 9. RASPBERRY PI NODE.JS REACT-NATIVE
  10. 10. RASPBERRY PI NODE.JS REACT-NATIVE
  11. 11. BOM Raspberry Pi 3 - Built-in BLE / Wifi WS281X LED Strip - NeoPixel - 1N4001 diode required https://learn.adafruit.com/neopixels-on-raspberry-pi/wiring
  12. 12. THIS IS THE NOGADA
  13. 13. RASPBERRY PI NODE.JS REACT-NATIVE
  14. 14. PACKAGE.JSON express rpi-ws281x-native - ws281x adapter bleno - bluetooth low energy package pi-wifi - wifi connection handler
  15. 15. CODE { }
  16. 16. RASPBERRY PI NODE.JS REACT-NATIVE
  17. 17. PACKAGE.JSON react-native - One of the best hybrid app react-native-ble-plx - Connect BLE
  18. 18. CODE { }
  19. 19. JUST IN CASE
  20. 20. CONCLUSION
  21. 21. PROS Still easy More reliable Better coding experience CONS Complex setup no BLE with iOS simulator Can’t write test Don’t forget the sudo
  22. 22. https://github.com/team-flit/raspi-light-react-meteor THE ORIGIN
  23. 23. https://github.com/colus001/raspberry-light
  24. 24. PLAN
  25. 25. CLOUD GATEWAY easier to setup PACKAGING easier to develop NO MORE WS281x easier to wire and light control
  26. 26. WE ARE HIRING! https://streami.co seokjun.kim@streami.co
  27. 27. @ colus001@me.com seokjun.kim@streami.co / seokjun.kr colus001.github.io github.com/colus001
  28. 28. while(1) { console.thanks() }

×