For slides and example code, see lesson 6
Note: Do not work on this repository right away.
Check existing forks to find the specific repository for your class.
- Run the previous Bluetooth LE examples on the Pi.
- Make sure node, npm and noble are all installed.
(Install noble locally, in~/fhnw-iot/06/Nodejs
) - Use the .js link on each page or check the main repo.
- To run a Node.js program my.js, type
$ node my.js
- Use the nRF5280 HRM BLE Peripheral for testing.
- Run the previous Web client and service examples.
- Use the .js link on each page or check the main repo.
- To display the IP address on the Pi, type:
$ ifconfig
- To run a Node.js program my.js, type:
$ node my.js
- Then access http://LOCAL_IP:8080/ or https://LOCAL_IP:4443/
- Create a systemd service as shown on previous slides.
- Instead of my.js use one of the Web server examples.
- Reboot the Raspberry Pi device with
$ sudo reboot
- Make sure the Web service still runs after the reboot.
- Install a Ngrok, Pagekite or Yaler relay service daemon.
- Configure it to publish the secure Node.js Web service.
- Submit the URL to access your Web service via Slack.
- Choose one of the BLE to Wi-Fi gateway use cases.
- Implement it, combining the above building blocks.
- If the Pi is a Web Server, expose it via a relay service.
- Or, if the Pi is a client, send data to an IoT platform.
(Depending on the use case you chose.)