Most recent activity
-
I think the light may be dawning - is it the case that whichever axis is vertical will always show a background value in the region of 16000 which is the acceleration due to gravity? I was assuming that the values are instantaneous acceleration as in change in velocity rather than "static" acceleration which shows gravity... In my tests, I had the Puck laying flat on the table and jogged it slightly sideways - I expected the Z acceleration to be zero, not 16000. I've now just tried standing it up on one side and jogging it slightly - and I'm seeing an X or Y axis acceleration of about 16000.
Martin -
I'm puzzled by what I'm seeing... I have a Puck programmed up to display the values coming back from the accelerometer :
require("puckjsv2-accel-movement").on(); var idleTimeout; Puck.on('accel',function(a) { LED.set(); if (idleTimeout) clearTimeout(idleTimeout); else { // print("Motion", a); var s = "{'type': 'M', 'x':" + a.acc.x + ", 'y':" + a.acc.y + ", 'z':" + a.acc.z + ", 'gx': " + a.gyro.x + ", 'gy':" + a.gyro.y + ", 'gz':" + a.gyro.z + "}"; Bluetooth.println(s); } idleTimeout = setTimeout(function() { idleTimeout = undefined; LED.reset(); },500); });
It certainly reports numbers, but they don't seem to bear much relationship to the magnitude of the movement. A small tap on the table produces : {'type': 'M', 'x':-644, 'y':133, 'z':14235, 'gx': -675, 'gy':-2386, 'gz':1043} and a major movement produces : {'type': 'M', 'x':2926, 'y':402, 'z':19069, 'gx': -675, 'gy':-2386, 'gz':1043}
what are the units?
TIA
Martin
-
Hi all, I need to program a Bangle (and, possibly, Puck) up for data capture and subsequent upload to a server. I have a lash-up that broadly works provided the Espruino device is connected to a PC over Bluetooth. If it has lost the connection, I need it to capture data and subsequently upload the next time it can connect. I can implement this from the PC with a wait-loop - very ugly - but I would prefer it to be event driven. I've been looking for bluetooth events in Espruino that will trigger if a device comes in range - but can't see anything - does anyone have any suggestions?
TIA
Martin
-
Hello Gordon and thanks for that. I had been assuming that I would have to do something along those lines if I hand carve it myself - was just hoping that someone else had already done the grunt work! Oh, well, back to the reference manual. I tried what you suggested and got errors out of espruino about no ports found - checked the version number and the version installed is ancient - need to update it!
Martin
-
Hi all. While the Web IDE is quite impressive, I really would like to use Jetbrains WebStorm which is a professional grade Javascript IDE. It supports plugins to implement things like interfaces to external devices and I'm sure it is possible to create one that makes use of the espruino CLI application to do the upload and run the code on the Puck or Bangle. But I'm not into reinventing wheels - got a project to complete and a deadline - so I just wondered if anyone had any experience of getting something like this working?
TIA
Martin
My wife and I design and build IoT solutions to assist elderly and infirm people in their everyday lives.