Edge Impulse Inference to IoT Dashboard
-
Hi @dipu_varghese ,
There is two way you can take the data/output information to the cloud.
-
You need to use the Arduino library for inferencing the model and then push the data in a particular interval or with the triggers. Since the BLE nano sense doesn't have WiFi, you might need to route the network via Bluetooth to the internet-connected gateway, for example, a raspberry pi as DIY or you can transfer the data from Arduino to a wifi controller via serial, for example, transfer the result via UART or I2C to esp8266 or esp32 and then from esp you can push the data to cloud.
-
The next method is you can use the prebuilt inferencing binary generated by the edge impulse system, as read the serial output with a Wffi or internet-enabled controller, such as raspberry pi, esp32, or esp8266, and after we need to do some processing and cleaning of the data, then push to the cloud.
These are the method in my mind, please check them and let me know what you think. Happy making .
-
-
Hi @salmanfaris
Thank you for sharing these two methods to take data/output information to the cloud. It's very helpful, and I appreciate your willingness to share your knowledge and expertise.
Regarding the second method, could you please clarify what kind of processing and cleaning of data needs to be done before pushing it to the cloud? Thank you!
Best,
Dipu -
@dipu_varghese The serial data from the prebuilt inferencing binary will be a little big with string size as it comes with all inferencing data points and it's confidence level plus the model information, you might only need the inferencing score or the inferencing data, so you can filter that out and send that to the cloud. Hope you get the idea. Let me know if you need an example.
-
Thank you for your response! @salmanfaris
It makes sense that filtering out the specific data points that are needed and sending them to the cloud would be the way to go.
If it's not too much trouble, could you please provide me with an example of how to filter out and send only the necessary inferencing data to the cloud?
Thank you again for your help!
Best,
Dipu -
@dipu_varghese Sure, I'll try to make an example in one coming day and share.
-
@salmanfaris I really appreciate your help and look forward to seeing the example.
Best,
Dipu -
@salmanfaris Hope you're doing well, did you get sometime to work on this?
Best,
Dipu -
@salmanfaris any updates?
Best,
Dipu -
Hi @dipu_varghese ,
Here is the sample input from the binary edge impulse inference,
Predictions (DSP: 16 ms., Classification: 1 ms., Anomaly: 2 ms.): idle: 0.91016 snake: 0.08203 updown: 0.00391 wave: 0.00391 anomaly score: -0.067”
And from here for example we can try to get the updown values only by attaching the device to another controller and read the Serial string directly.
void setup() { // Start serial communication at 9600 baud Serial.begin(9600); } void loop() { // Wait until there is data available on the serial port while (!Serial.available()) { // Do nothing } // Read the input string from the serial port String inputString = Serial.readStringUntil('\n'); // Find the position of the "updown" value in the input string int updownPos = inputString.indexOf("updown:"); // If the "updown" value was found in the input string if (updownPos >= 0) { // Extract the "updown" value from the input string String updownString = inputString.substring(updownPos + 8, inputString.indexOf('\n', updownPos)); // Convert the "updown" value to a float float updownValue = updownString.toFloat(); // Output the "updown" value Serial.println(updownValue); } }
The sketch should then output the "updown" value, which is 0.08203.
Hope this will be helpful, let me know if you need more clarification.
-
@salmanfaris thank you so much man, I'll try this and update you shortly. Thank you once again.
Best,
Dipu