Connect Roblox to The Things Network ... To create an #IoT Digital Twin? 🤔
https://developer.roblox.com/en-us/api-reference/class/HttpService
https://www.thethingsindustries.com/docs/integrations/storage/retrieve/
What's a "Digital Twin"? It's a Virtual Object that mirrors a Real-World Object thru Sensors and Actuators ... Let's build this with #Roblox and #TheThingsNetwork
#Roblox Lua Scripting looks fun!
https://developer.roblox.com/en-us/onboarding/intro-to-coding/1
#TheThingsNetwork exposes an API (HTTP GET) ... To fetch the Sensor Data from our #LoRa Devices
https://github.com/lupyuen/roblox-the-things-network#fetch-sensor-data-from-the-things-network
#Roblox provides a Lua Scripting API that fetches External HTTP URLs (GET and POST)
https://developer.roblox.com/en-us/api-reference/class/HttpService
#Roblox fetches Sensor Data from #TheThingsNetwork yay! 🎉 Next we decode the Sensor Data with Base64 and CBOR
To decode Base64 and CBOR in #Roblox ... Just copy the Lua Libraries as ModuleScripts
https://github.com/lupyuen/roblox-the-things-network#decode-base64-and-cbor-in-roblox
Here's the #Roblox Lua Script that fetches Sensor Data from #TheThingsNetwork
https://github.com/lupyuen/roblox-the-things-network/blob/main/DigitalTwin.lua
Our #Roblox Script fetches Sensor Data from #TheThingsNetwork ... And decodes Base64 + CBOR correctly yay! 🎉
Would be so fun if #Roblox could overlay Real-World Objects thru Augmented Reality ... And watch Sensor Data in real time!
Excellent idea by Camden Bruce: Using #Roblox and #TheThingsNetwork to monitor and control your home
We have defined 3 #Roblox Particle Emitters to render the Temperature ... Let's interpolate them to render the Actual Temperature recorded by #TheThingsNetwork
https://github.com/lupyuen/roblox-the-things-network#render-temperature-with-roblox-particle-emitter
Here's how we render a #Roblox Particle Emitter in Lua Script
https://github.com/lupyuen/roblox-the-things-network/blob/main/DigitalTwin.lua#L144-L203
Interpolating our #Roblox Particle Emitters for High / Mid / Low Temperatures
https://github.com/lupyuen/roblox-the-things-network/blob/main/DigitalTwin.lua#L231-L319
Here's our #Roblox Particle Emitter that interpolates 3 emitters ... To render High / Mid / Low Temperatures
https://github.com/lupyuen/roblox-the-things-network#render-temperature-with-roblox-particle-emitter
Connecting #PineDio Stack BL604 @PINE64 to #Roblox (via #TheThingsNetwork) ... All shall be explained in this article
How #Roblox mirrors a Real-World Object thru #LoRa and #TheThingsNetwork
https://lupyuen.github.io/articles/roblox?2#roblox-mirrors-real-life
#Roblox provides a handy HTTP API for fetching external URLs
https://lupyuen.github.io/articles/roblox?3#roblox-fetches-sensor-data
#Roblox fetching Sensor Data from #TheThingsNetwork
https://lupyuen.github.io/articles/roblox?4#define-constants
How we fetch #TheThingsNetwork URL in our #Roblox Lua Script
https://lupyuen.github.io/articles/roblox?5#send-http-request
#Roblox decodes the Sensor Data returned by #TheThingsNetwork: JSON, Base64 and CBOR
https://lupyuen.github.io/articles/roblox?6#decode-http-response
Here's how we run #TheThingsNetwork Demo in #Roblox
https://lupyuen.github.io/articles/roblox?7#roblox-mirroring-in-action
Why we need Base64 and CBOR Decoding ... In our #Roblox Script for #TheThingsNetwork
https://lupyuen.github.io/articles/roblox?8#decode-base64-and-cbor-in-roblox
Decoding Base64 and CBOR ... In our #Roblox Script for #TheThingsNetwork
https://lupyuen.github.io/articles/roblox?9#base64-and-cbor-modulescripts
How we render a Particle Emitter in #Roblox Script
https://lupyuen.github.io/articles/roblox?10#render-temperature-with-roblox-particle-emitter
Interpolating our #Roblox Particle Emitter
https://lupyuen.github.io/articles/roblox?12#interpolate-the-particle-emitter
Linear Interpolation in #Roblox Script
https://lupyuen.github.io/articles/roblox?16#linear-interpolation
Demo of #PineDio Stack BL604 syncing with #Roblox over #TheThingsNetwork
https://lupyuen.github.io/articles/roblox?18#digital-twin-demo
Here's how we store Uplink Messages in #TheThingsNetwork
https://lupyuen.github.io/articles/roblox?19#appendix-the-things-network-settings
Fetching Uplink Messages from #TheThingsNetwork
https://lupyuen.github.io/articles/roblox?21#appendix-fetch-sensor-data-from-the-things-network
Can we use #Roblox to monitor an IoT Device ... Thru #LoRaWAN and #TheThingsNetwork? Let's find out!
#PineDio Stack BL604 @PINE64 syncs with #Roblox over #TheThingsNetwork 🎉
https://youtu.be/QKjtue_tPGM