Replies: 5 comments 4 replies
-
I'll try to get to doing this! No promise on when though 🙂 |
Beta Was this translation helpful? Give feedback.
-
Here you go, I kept the count in to help differentiate: CSV, etc
|
Beta Was this translation helpful? Give feedback.
-
@bobrippling Oh wow, thanks so much! I've added this to the model, and it was quite helpful! If possible, would you be able to record another gesture? This is to differentiate between the two gestures. The gesture is called Ps: the gesture collection code for agitate is this, sent to RAM // ******* Gesture collecting code ********
// ******* Paste this in the right-hand side of the IDE, and flash it to RAM ********
name="Gesture";
event="Agitate";
var fname = 1;
var count=0;
function gotGesture(d) {
var f = require("Storage").open(event + "." + fname + ".csv", "a");
count+=1;
print("timestamp, x, y, z");
f.write("timestamp, x, y, z\n");
for (var j=0;j<d.length;j+=3) {
print(j +", ", d[j] + ", " + d[j+1] + ", " + d[j+2] );
f.write(j + ", " + d[j] + ", " + d[j+1] + ", " + d[j+2] +"\n" );
}
print("Count: "+count);
g.clear();
g.setColor(1,1,1);
var my = g.getHeight()/2;
var sy = my/128;
var sx = g.getWidth()/(50*3);
g.drawLine(0,my,g.getWidth(),my);
for (var i=0;i<d.length-3;i+=3) {
for (var c=0;c<3;c++) {
g.setColor(c==0,c==1,c==2);
g.drawLine(i*sx, my+d[i+c]*sy, (i+3)*sx, my+d[i+c+3]*sy);
}
}
g.flip(1);
}
Bangle.on('gesture',gotGesture); |
Beta Was this translation helpful? Give feedback.
-
Twist the wrist outwards
|
Beta Was this translation helpful? Give feedback.
-
Agitate
Note: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello all!
I am working on creating an app using an ML model that is able to detect certain gestures. Currently, I have one gesture: Twist the wrist outwards to lock (As seen in the video below). However, I have only gotten so far by using only my gesture data. To make this app work seamlessly for every user, I was hoping a few people could also collect some samples for the twisting outward gesture with their bangle. It will only take a few minutes, and will help immensely. If you want to help me collect some data, all you need to do is paste the code snippet below into the right side of the Espruino IDE, and flash it to RAM. All you need to do from there is do the gesture (preferably 15-30 times), and the code will automatically write it to a CSV file on the bangle called TwistOut.csv. After the data has been collected, you can return to the home screen on the watch, from Storage in the IDE, download the CSV file, and simply reply to this thread and upload the file. If you are willing, it would dramatically increase the accuracy of the model, and ensure a smooth app for everyone in the community to use.
Additionally, if you have ideas for other gestures, I'd love to hear it :)
Gesture Video:
IMG_0986.MOV
Beta Was this translation helpful? Give feedback.
All reactions