Untitled
Anonymous
plain_text
09/10/2024 5:31 AM
400 B
36
Indexable
// Generate random weight between 10 and 100 kg
var weight = Math.floor(Math.random() * 90) + 10;
// Generate random temperature between 30 and 45°C
var temperature = Math.floor(Math.random() * 15) + 30;
msg.payload = {
weight: weight,
temperature: temperature
};
return msg;
Editor is loading...
Leave a Comment