Help Processing data

I have mentioned this project in another forum post but I would like to dedicate a topic for this project. This is a school project and I am using a variety of sensors connected to a chip that is cloud connected to import it's data into IBM Watson. For example I am looking at Accelerometer Z axis movement to detect a sprint. If the accel Z value exceeds a threshold value, I would like to count it as a sprint. As you can see I am also trying to implement a basic finite state machine with the accelerometer which is either in state 0 (resting) or in state 1 (sprinting). I am also using the gyroscope y axis to detect kicking of a ball during a soccer game. similar to the sprinting code it counts kicks after the value has exceeded a specific threshold value. However this is more simple since it does not need to implement a FSM. In addition to all that I would like to display the battery level which does not need to be processed unlike the other two features of my app. IF i can get some guidance how to do this I would greatly appreciate it :slight_smile: I have very little experience with java so please forgive my mistakes

I need help writing the functions to analyze the data

Fortunately for you Node-RED still doesn’t use Java but is based on javascript

From the debug messages be careful you always need to return a javascript object (think msg.payload)
rather than just a number. It would be well worth reading a tutorial on javascript objects and arrays if you are unsure of those terms.

There’s also a great page in the docs about working with messages that will show you how to use the debug node to your advantage.

Isn't this the same topic as you opened yesterday ??

@rayy please don't waste peoples time by opening duplicate posts.

sorry i just need help because i am completely lost

If this is a school project, did they just throw Node-RED into your knees? Without any training class of the fundamentals? Or did you just pick up Node-RED yourself? In any case, you do not, or should not, purchase & drive a car BEFORE you passed the tests and received the drive license :wink:

Anyway, I suppose the whole idea with the school project is that your are supposed to learn something from it, rather than us helping you to take shortcuts???

Publish & share your project so people willing to cheat, sorry, help, can study what you have done so far

PLEASE do that on the OTHER thread IBM Watson Sensor Support